https://sourceware.org/bugzilla/show_bug.cgi?id=18959
Bug ID: 18959 Summary: gold doesn't respect alignment of .rodata.str.* section Product: binutils Version: 2.26 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: koriakin at 0x04 dot net CC: ian at airs dot com Target Milestone: --- Here's a test case: $ cat t.s .section .rodata.str1.2, "aMS",1 .balign 2 .global a a: .asciz "ab" .balign 2 .global b b: .asciz "" $ as t.s -o t.o $ ld.gold t.o -shared -o t.so $ nm t.so 00000000000001fc R a 00000000000001ff R b 00000000000012b0 A __bss_start 0000000000001200 d _DYNAMIC 00000000000012b0 A _edata 00000000000012b0 A _end $ ld.bfd t.o -shared -o t.so $ nm t.so 00000000000001dc R a 00000000000001de R b 0000000000200290 D __bss_start 00000000002001e0 d _DYNAMIC 0000000000200290 D _edata 0000000000200290 D _end 0000000000200290 d _GLOBAL_OFFSET_TABLE_ b is properly aligned to 2 bytes with bfd ld, but not with gold. This happens with any architecture, I found it while working on s390, but it's readily reproducible with x86_64, i386, etc. Could possibly be a reason for #18855 if (like s390) relocations with alignment restrictions are involved, but I have no way of checking. I'm going to try making a patch for this issue right now. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils