]> granicus.if.org Git - llvm/commit
Merging r361237:
authorTom Stellard <tstellar@redhat.com>
Thu, 6 Jun 2019 03:18:22 +0000 (03:18 +0000)
committerTom Stellard <tstellar@redhat.com>
Thu, 6 Jun 2019 03:18:22 +0000 (03:18 +0000)
commit758e1f3fd0a568667a96c1805de7307c7833a634
treef891bc9407ccf2f1917a009de9afd7d83f8e1a58
parent98e29d3b2101563fadecd5b0f4667a319896ab2a
Merging r361237:

------------------------------------------------------------------------
r361237 | maskray | 2019-05-21 03:41:25 -0700 (Tue, 21 May 2019) | 14 lines

[PPC64] Update LocalEntry from assigned symbols

On PowerPC64 ELFv2 ABI, functions may have 2 entry points: global and local.
The local entry point location of a function is stored in the st_other field of the symbol, as an offset relative to the global entry point.

In order to make symbol assignments (e.g. .equ/.set) work properly with this, PPCTargetELFStreamer already copies the local entry bits from the source symbol to the destination one, on emitAssignment(). The problem is that this copy is performed only at the assignment location, where the source symbol may not yet have processed the .localentry directive, that sets the local entry. This may cause the destination symbol to end up with wrong local entry information. Other symbol info is not affected by this because, in this case, the destination symbol value is actually a symbol reference.

This change keeps track of these assignments, and update all needed st_other fields when finish() is called.

Patch by Leandro Lupori!

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D56586
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_80@362671 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
test/MC/PowerPC/ppc64-localentry-symbols.s [moved from test/MC/PowerPC/ppc64-localentry-symver.s with 58% similarity]