https://sourceware.org/bugzilla/show_bug.cgi?id=16794

Ryan Prichard <rprichard at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rprichard at google dot com

--- Comment #4 from Ryan Prichard <rprichard at google dot com> ---
I looked at the testcase briefly, and it looked like test.o contained two
strings, "xabcde" and "abcde". ld.bfd merged the two, but ld.gold didn't. I
used "GNU gold (GNU Binutils for Debian 2.31.1) 1.16".

However, if I write a test case where the strings/constants are identical, they
*are* merged, and gold doesn't reliably update the GOT offset on the
relocations. Gold seems to handle a relocation to a local symbol within a
mergeable section, but not a relocation to the section directly.

I'll attach a test case that writes a couple of x86-32 assembly files and runs
them on a Linux machine. I'm using the syntax,
"(.rodata.str1.1+4)@GOTOFF(%ebx)" on x86-32 to reference the section rather
than a symbol.

LLVM has a workaround for this bug. It was briefly reverted, then restored:
https://reviews.llvm.org/D64327.

-- 
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

Reply via email to