This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question on ppc64 and --relax


On Mon, Nov 12, 2018 at 11:56:50AM +0100, Douglas B Rupp wrote:
> Greetings,
> 
> I understand that ppc64 makes function calls through function descriptors,
> but afaict these function descriptors are all output at the beginning of the
> .text section so the range of a function call (without resorting to
> -mlongcall) isn't substantially better than that found on ppc32.

powerpc64 ELFv1 uses function descriptors, placed in the .opd section
which is near other relro sections.  These are used when making calls
via the PLT and when taking the address of a function.  They aren't
used when making a direct call.

powerpc64le ELFv2 doesn't use function descriptors.

GNU ld will add stubs between direct calls that don't reach, for both
ELFv1 and ELFv2.  So will gold.  This works provided you don't make
object file text sections too large (33M is the limit) either with
huge source files (where -ffunction-sections may help) or by mashing
together files with ld -r (in which case don't be so silly).

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]