[PATCH] D16771: [ELF] PHDRS linker script command implemented.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 07:54:05 PST 2016

grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.

This patch is heavily dependent on
http://reviews.llvm.org/D16575 which is not landed yet.
So now it is here to show that whole approach used in D16575 is workable.

Patch implements PHDRS linker script command with few restrictions
which at this stage looks reasonable to live with.

Known issues/restrictions:
* NONE header is not completely supported.
* First header should be PT_PHDR, and first 
  PT_LOAD should contain FILEHDR and PHDRS attribute.
* Relro is currently disabled for linkerscript.

Main functionality is performed in scanHeadersLinkerScript() method. 
It works like scanHeaders() but uses the options from linker script 
to build headers map.

assignAddresses() at start checks what method, 
scanHeaders/scanHeadersLinkerScript to use depending on
presence of LS and then does all required job.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16771.46534.patch
Type: text/x-patch
Size: 58835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160201/bbea8b54/attachment-0001.bin>

More information about the llvm-commits mailing list