bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/16794] gold doesn't include the "implicit addend" when process


From: rprichard at google dot com
Subject: [Bug gold/16794] gold doesn't include the "implicit addend" when processing REL relocations to mergable sections
Date: Tue, 10 Sep 2019 03:50:04 +0000

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]