Page MenuHomePhabricator

Mark the $local function begin symbol as a function
ClosedPublic

Authored by arichardson on Aug 8 2022, 1:06 PM.

Details

Summary

While this does not matter for most targets, when building for Arm Morello,
we have to mark the symbol as a function and add size information, so that
LLD can correctly evaluate relocations against the local symbol.
Since Morello is an out-of-tree target, I tried to reproduce this with
in-tree backends and with the previous reviews applied this results in
a noticeable difference when targeting Thumb.

Background: Morello uses a method similar Thumb where the encoding mode is
specified in the LSB of the symbol. If we don't mark the target as a
function, the relocation will not have the LSB set and calls will end up
using the wrong encoding mode (which will almost certainly crash).

Diff Detail

Event Timeline

arichardson created this revision.Aug 8 2022, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 1:27 PM
  • rebase
  • fix update_llc_test_checks for Arm as well
MaskRay accepted this revision.Aug 24 2022, 10:47 PM

(I am out of town.)

This revision is now accepted and ready to land.Aug 24 2022, 10:47 PM

Rebase after D131433 was reverted

This revision was landed with ongoing or failed builds.Aug 26 2022, 2:34 AM
This revision was automatically updated to reflect the committed changes.