[lld] r249816 - [ELF2] - Implemented rel[a].plt sections
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 9 08:15:28 PDT 2015
On 9 October 2015 at 10:58, George Rimar <grimar at accesssoftek.com> wrote:
> Oh, I didn`t notice first:
>
> It looks my next patch can fix the issue you have.
> http://reviews.llvm.org/D13589
>
> $ ./bin/FileCheck
> ./bin/FileCheck: error while loading shared libraries: unexpected PLT reloc type 0x06
>
> 6 is R_X86_64_GLOB_DAT. Patch fixes is to R_X86_64_JUMP_SLOT for plt like they should be.
> Can it help ?
It should help, but I don't think it will be enough.
The main issue is the PLT format. Right new we produce just
call foo at got
That requires the got to be set correctly before the call.
For lazy resolution to work, the format has to be a bit more
complicated. The dynamic linker first sets it so that the initial call
goes to the dynamic linker and gives it enough info to resolve it.
We should implement that at some point, but I think keeping the
ability to produce simple, eagerly resolved entries is something we
should do (probably behind -z now or similar). The are a few nice
properties:
* Just a single relocation section.
* Just a single got section.
* Faster and smaller PLT.
* Got can be made read only once the dynamic linker is done (we still
have to implement PT_GNU_RELRO for that).
Cheers,
Rafael
More information about the llvm-commits
mailing list