Menu

#536 misaligned relocations in macho64 output

open
nobody
Assembler (85)
5
2011-04-18
2011-04-18
No

I encountered this problem where an alignb (or even just a sectalign) in a data section (here .rodata) breaks a relocation if the .text section was not padded to the same alignment. It seems like this should be completely independant. The final outcome is that a variable contains 0x100000ed0000000 instead of 0x100000ed0 (the relocation was done 3 bytes too far). See the comments in the attached files for more details and how the test is built. The exact same code (minus the leading underscore for the globals) works fine with elf64 and win64 output. I have tested 2.09.08, 2.10rc4 and the latest from git.

Discussion

  • Olivier Paquet

    Olivier Paquet - 2011-04-18

    assembly source for test case

     
  • Olivier Paquet

    Olivier Paquet - 2011-04-18

    C++ source for test case

     
  • Nobody/Anonymous

    thanks for report, we will look into this bug as only time permits.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.