[PATCH] D55505: [LLD][ELF] Implement option to force PIC compatible Thunks

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 10 04:13:41 PST 2018


peter.smith created this revision.
peter.smith added reviewers: grimar, ruiu.
Herald added subscribers: kristof.beyls, arichardson, javed.absar, emaste.
Herald added a reviewer: espindola.

By default LLD will generate position independent Thunks when the --pie or --shared option is used. Reference to absolute addresses is permitted in other cases. For some embedded systems position independent thunks are needed for code that executes before the MMU has been set up. The option --pic-veneer is used by ld.bfd to force position independent thunks.

      

The patch adds an option --pic-thunk with --pic-veneer as an alias to support this option. The --pic-veneer option is needed for the Linux kernel on Arm.

Fixes pr39886 (https://bugs.llvm.org/show_bug.cgi?id=39886)


https://reviews.llvm.org/D55505

Files:
  ELF/Config.h
  ELF/Driver.cpp
  ELF/Options.td
  ELF/Thunks.cpp
  test/ELF/arm-force-pi-thunk.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55505.177485.patch
Type: text/x-patch
Size: 6846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181210/609d23b4/attachment.bin>


More information about the llvm-commits mailing list