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: [committed, PATCH] x86: Properly check building shared library


> I'm curious as to why this is necessary, in case other targets need
> the same treatment.  Normally a PIE is built from position independent
> code, and thus addresses of functions are loaded from the GOT.  That
> means there is no need to use any tricks to avoid dynamic text relocs.

I, for one, think it is not necessary, as anywhere it's valid to treat
the PC32 reloc as if it were a PLT32 reloc, the compiler or assembler
could (and should) have simply used a PLT32 reloc. I think it's
dangerous to simply assume that it's always valid to redirect any
arbitrary PC32 reloc to a PLT entry. There's a reason these are two
separate relocations.

I also think this is likely to be unique to the x86 architecture.

-cary


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