[llvm-bugs] [Bug 28976] New: Corrupted section contents when using linker scripts

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Aug 14 19:52:54 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28976

            Bug ID: 28976
           Summary: Corrupted section contents when using linker scripts
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: wallbraker at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16948
  --> https://llvm.org/bugs/attachment.cgi?id=16948&action=edit
Somewhat reduced test

I'm using a linker script along with "objdump -O binary" to create a kernel
binary to use with QEMU, source is available here:
https://github.com/VoltLang/metal . To complicate things even more it is
written in a language of my own making.

When updating from a checkout from the 3rd of August to now I get corruptions
both in the ELF file and in the resulting binary. I comped the ELF files and
binaries with hd and diff. I have bisected the issue down to these commits:

last good:
SVN: 278446, git: 39ea174062a6954a5e551f12690e654b00ec0c73
bad-1:
SVN: 278449, git: 38c706b1e4887d7dc5cbf8ef0de93b3a581cf489
bad-2:
SVN: 278461, git: 17258232b07c4ce3c73b70e9ce162d2141d2f861


bad-1 has a different set of corruptions from bad-2.


For example here is part of the boot_text section from the ELF files:

good:
00001180  00 00 00 e8 ad 01 00 00  bf fc 03 00 00 be 0b 00  |................|
00001190  00 00 e8 9e 01 00 00 5d  c3 42 6f 6f 74 20 4d 65  |.......].Boot Me|
000011a0  74 61 6c 0a 00 00 00 00  00 00 00 00 00 00 00 00  |tal.............|

bad-2:
00001180  00 00 00 e8 ad 01 00 00  bf fc 03 00 00 be 0b 0d  |................|
00001190  ff ff ff 9e 01 00 00 5d  c3 42 52 01 00 00 4d 65  |.......].BR...Me|
000011a0  74 61 6c 0a 00 00 00 00  00 00 00 00 00 00 00 00  |tal.............|

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160815/bc119a88/attachment.html>


More information about the llvm-bugs mailing list