[PATCH] x86-64: always use unsigned 32-bit relocation for 32-bit addressing

Jan Beulich JBeulich@suse.com
Mon Nov 13 14:30:00 GMT 2017


>>> On 13.11.17 at 14:35, <hjl.tools@gmail.com> wrote:
> On Mon, Nov 13, 2017 at 3:50 AM, Jan Beulich <JBeulich@suse.com> wrote:
>> Except for %eip-relative addressing, where we don't have a suitable
>> relocation type silently wrapping at the 4G boundary, consistently
>> force use of R_X86_64_32 (in ELF terms) instead of its sign-extending
>> counterpart. This wasn't right in case there was no base register in
>> the addressing expression.
> 
> Since displacement is signed, won't it generate different code?  Is there
> a bug report to show it is necessary?

I'm afraid I don't understand the question: Signed-ness of
32-bit quantities doesn't matter when talking of 32-bit addressing.
If you think something is wrong here, may I ask that you take the
tests being added and state what you would want to see be the
expected result(s)?

Jan



More information about the Binutils mailing list