bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/j


From: hjl.tools at gmail dot com
Subject: [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`
Date: Sun, 10 Jan 2021 19:24:24 +0000

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

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Fangrui Song from comment #2)
> (In reply to H.J. Lu from comment #1)
> > Since i386 doesn't have IP-relative addressing, non-PIC PLT is different
> > from PIC PLT.  Using R_386_PLT32 for "call/jmp foo" isn't appreciate.
> 
> I know that this is a convention using R_386_PC32 for non-PIC PLT and
> R_386_PLT32. It is artificial and assembler/linker/ld.so do not need this
> convention for interop.

R_386_PLT32 should be used with the EBX based PLT and "call foo" doesn't
require setting up EBX for PLT.

> On most other architectures branch relocation types are distinguishable from
> address taken relocation types (direct access).

This can't be fixed with R_386_PLT32.

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