[PATCH] D86263: [ELF] Keep st_type for symbol assignment
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 22:06:01 PDT 2020
MaskRay created this revision.
MaskRay added reviewers: grimar, psmith, smeenai.
Herald added subscribers: llvm-commits, kristof.beyls, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
MaskRay requested review of this revision.
PR46970: for `alias = aliasee`, the alias can be used in relocation processing
and on ARM st_type does affect Thumb interworking. It is thus desirable for the
alias to get the same st_type.
Note that the st_size field should not be retained because some tools use
st_size=0 as a heuristic to detect aliases. Retaining st_size can thwart such
heuristics and cause aliases to be preferred over the original symbols.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86263
Files:
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/test/ELF/linkerscript/common-assign.s
lld/test/ELF/linkerscript/symbol-assign-type.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86263.286709.patch
Type: text/x-patch
Size: 3705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200820/0985d969/attachment.bin>
More information about the llvm-commits
mailing list