[PATCH] D102126: [lld-macho] place __TEXT,__stubs before __TEXT,__text
Greg McGary via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 9 00:25:38 PDT 2021
gkm created this revision.
gkm added a reviewer: lld-macho.
Herald added a subscriber: wenlei.
Herald added a reviewer: int3.
Herald added a project: lld-macho.
gkm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The thunk placement algorithm is better (lower cost, better results) when __stubs immediatelly precedes __text.
Also, when __stubs comes first AND PGO/FDO places hot code at the front of __text, then stubs are reachable without thunks from low __text addresses.
The test cases now work with either layout.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102126
Files:
lld/MachO/InputSection.h
lld/MachO/SyntheticSections.cpp
lld/MachO/Writer.cpp
lld/test/MachO/invalid/range-check.s
lld/test/MachO/symtab.s
lld/test/MachO/x86-64-stubs.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102126.343902.patch
Type: text/x-patch
Size: 7132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210509/16f574dd/attachment.bin>
More information about the llvm-commits
mailing list