Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#536 misaligned relocations in macho64 output

open
nobody
Assembler (85)
5
2011-04-18
2011-04-18
Olivier Paquet
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

     
    Attachments
  • Olivier Paquet
    Olivier Paquet
    2011-04-18

    C++ source for test case

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