[Bug 597752] New: file: llvm bitcode magic is missing
http://bugzilla.novell.com/show_bug.cgi?id=597752 http://bugzilla.novell.com/show_bug.cgi?id=597752#c0 Summary: file: llvm bitcode magic is missing Classification: openSUSE Product: openSUSE 11.3 Version: Factory Platform: All OS/Version: Other Status: NEW Severity: Enhancement Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jslaby@novell.com QAContact: qa@suse.de CC: werner@novell.com Found By: --- Blocker: --- Could you please add this to magics: 0 string BC
2 byte 0xc0
3 byte 0xde llvm bitcode
The code which is from llvm itself: // Sniff for the signature. if (Stream.Read(8) != 'B' || Stream.Read(8) != 'C' || Stream.Read(4) != 0x0 || Stream.Read(4) != 0xC || Stream.Read(4) != 0xE || Stream.Read(4) != 0xD) return Error("Invalid bitcode signature"); An example from x86 (i.e. LE): $ hexdump -C llvm_bitcode.lo | head -1 00000000 42 43 c0 de 21 0c 00 00 4f 05 00 00 01 10 00 00 |BC..!...O.......| -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=597752
http://bugzilla.novell.com/show_bug.cgi?id=597752#c1
Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=597752
http://bugzilla.novell.com/show_bug.cgi?id=597752#c2
Jiri Slaby
0 string llvm LLVM byte-codes, uncompressed 0 string llvc0 LLVM byte-codes, null compression 0 string llvc1 LLVM byte-codes, gzip compression 0 string llvc2 LLVM byte-codes, bzip2 compression
I'd like to know what the difference and why this new code was not added to this file?
These are for prehistorical 1.x versions. The "BC" one is for 2.x. Anyway, I found a doc page [1] saying: ===== The first two bytes of a bitcode file are 'BC' (0x42, 0x43). The second two bytes are an application-specific magic number. Generic bitcode tools can look at only the first two bytes to verify the file is bitcode, while application-specific programs will want to look at all four. ===== So we should add '0 string BC llvm 2.x bitcode' instead of the entries in the comment #0. [1] http://llvm.org/docs/BitCodeFormat.html -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=597752
http://bugzilla.novell.com/show_bug.cgi?id=597752#c3
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=597752
https://bugzilla.novell.com/show_bug.cgi?id=597752#c4
--- Comment #4 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=597752
https://bugzilla.novell.com/show_bug.cgi?id=597752#c5
--- Comment #5 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com