This is an archive of the discontinued LLVM Phabricator instance.

Don't bypass the GOT for delta32toGOT references
ClosedPublic

Authored by pete on Dec 8 2015, 4:12 PM.

Details

Reviewers
kledzik
lhames
Summary

Hi all

In arm64, the relocation from gcc_except_table to a global in the data section was using a delta32toGOT reference. However, lld was turning this in to a direct reference from the gcc_except_table to the global it points at.

This was ultimately crashing in libunwind as the gcc_except_table had encoded the DW_EH_PE_indirect flag to tell us that the data requires an extra level of indirection, i.e., is in the GOT.

Diff Detail

Event Timeline

pete updated this revision to Diff 42242.Dec 8 2015, 4:12 PM
pete retitled this revision from to Don't bypass the GOT for delta32toGOT references.
pete updated this object.
pete added a reviewer: lhames.
pete added a project: lld.
pete added a subscriber: kledzik.
kledzik accepted this revision.Dec 8 2015, 4:33 PM
kledzik added a reviewer: kledzik.

LGTM

test/mach-o/gcc_except_tab-got-arm64.yaml
5–12

Some spurious comments here.

This revision is now accepted and ready to land.Dec 8 2015, 4:33 PM
pete closed this revision.Dec 8 2015, 4:50 PM
pete marked an inline comment as done.

Thanks Nick. Committed with a fix to that comment in the test. r255085.

test/mach-o/gcc_except_tab-got-arm64.yaml
5–12

Oops. That was left over from the test I copied. Thanks for catching it.