[PATCH] D13651: [ELF2] - Initial lazy loading support (x86_x64)
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 07:30:38 PDT 2015
grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: grimar, llvm-commits.
Main aim of this patch to support lazy loading.
This patch implements it for x86_x64 target. So what whas done:
1) .got.plt section is created for functions required PLT. .got.plt has 3 predefines empty entries required for dynamic linker.
also other items created are configured to have correct jump to PLT[N]
2) PLT section now has PLT[0] entry, also others ones are configured to support PLT->GOT calls.
3) .rel[a].plt sections (based on patch http://reviews.llvm.org/D13569)
4) Fixed plt rellocations types (based on patch http://reviews.llvm.org/D13589)
Note:
The only thing I am doubt here is: do first 3 .got.plt enties should be initialized or leaved for dynamic linker ? In this patch them are empty now. ld initializes the first one with something and leaves another 2 empty.
http://reviews.llvm.org/D13651
Files:
ELF/OutputSections.cpp
ELF/OutputSections.h
ELF/Target.cpp
ELF/Target.h
ELF/Writer.cpp
test/elf2/plt-i686.s
test/elf2/plt.s
test/elf2/relocation-i686.s
test/elf2/relocation.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13651.37107.patch
Type: text/x-patch
Size: 32253 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151012/a4e85453/attachment.bin>
More information about the llvm-commits
mailing list