HomePhabricator

[lld-macho] Implement support for PIC

Authored by int3 on Sep 5 2020, 10:55 AM.

Description

[lld-macho] Implement support for PIC

  • Implement rebase opcodes. Rebase opcodes tell dyld where absolute addresses have been encoded in the binary. If the binary is not loaded at its preferred address, dyld has to rebase these addresses by adding an offset to them.
  • Support -pie and use it to test rebase opcodes.

This is necessary for absolute address references in dylibs, bundles etc
to work.

Reviewed By: #lld-macho, gkm

Differential Revision: https://reviews.llvm.org/D87199

Details

Committed
int3Sep 25 2020, 11:28 AM
Reviewer
Restricted Project
Differential Revision
D87199: [lld-macho] Implement support for PIC
Parents
rG06104cb9f21d: [NFC] Fix comment for DataOp
Branches
Unknown
Tags
Unknown