[PATCH] D131429: Mark the $local function begin symbol as a function
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 13:28:00 PDT 2022
arichardson created this revision.
Herald added subscribers: kosarev, kerbowa, hiraditya, kristof.beyls, jvesely.
Herald added a project: All.
arichardson added a reviewer: MaskRay.
Herald added a subscriber: StephenFan.
arichardson published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131429
Files:
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/test/CodeGen/AArch64/elf-preemption.ll
llvm/test/CodeGen/AArch64/semantic-interposition-asm.ll
llvm/test/CodeGen/ARM/thumb-function-section-reloc.ll
llvm/test/CodeGen/VE/Scalar/builtin_sjlj_landingpad.ll
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_generated_funcs.ll.generated.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_generated_funcs.ll.nogenerated.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/lanai_generated_funcs.ll.generated.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/lanai_generated_funcs.ll.nogenerated.expected
llvm/utils/UpdateTestChecks/asm.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131429.450914.patch
Type: text/x-patch
Size: 11056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220808/6f9f5cbd/attachment.bin>
More information about the llvm-commits
mailing list