Page MenuHomePhabricator

[PPC32] Fix PLT calls for -msecure-plt -fpic

Authored by MaskRay on Jun 19 2019, 9:29 AM.



In Secure PLT ABI, -fpic is similar to -fPIC. The difference is that:

  • the address of _GLOBAL_OFFSET_TABLE instead of .got2+0x8000 is stored in r30.
  • R_PPC_PLTREL24 does not get an addend of 0x8000.

Diff Detail


Event Timeline

MaskRay created this revision.Jun 19 2019, 9:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2019, 9:29 AM
MaskRay updated this revision to Diff 205621.Jun 19 2019, 9:31 AM
MaskRay retitled this revision from [PPC32] Support -msecure-plt -fpic to [PPC32] Fix PLT calls for -msecure-plt -fpic.

Update title

MaskRay updated this revision to Diff 205633.Jun 19 2019, 10:20 AM

Fix R_*_PLTREL addend

jhibbits accepted this revision.Jun 23 2019, 7:28 PM

Looks fine to me. @hfinkel or @nemanjai?

This revision is now accepted and ready to land.Jun 23 2019, 7:28 PM
MaskRay updated this revision to Diff 206362.Jun 24 2019, 9:34 PM
MaskRay edited the summary of this revision. (Show Details)

Update description

This revision was automatically updated to reflect the committed changes.
adalava removed a subscriber: adalava.Sep 30 2019, 7:13 AM