[lld] [lld-macho] Ensure all sections in __TEXT get thunks if necessary (PR #87818)
Leonard Grey via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 07:14:46 PDT 2024
speednoisemovement wrote:
So this doesn't totally do it; Chromium ASAN `browser_tests` still blows up on calls from `new` (in `__lcxx_override`) to `__stubs`. This is since we assume that stubs comes after any calls into it (https://github.com/llvm/llvm-project/blob/08fae467e4c742e91c8fdff8519718cf2c7c9b0e/lld/MachO/ConcatOutputSection.cpp#L293).
So, contra the original description, moving the section closer to and/or before stubs does help in this specific case; it's just not sufficient to solve the entire problem.
I think we want to refactor how we do this, maybe by ensuring all `__TEXT` sections with jumps are packed together. It might make sense to consider the iterative algorithm ELF uses too.
https://github.com/llvm/llvm-project/pull/87818
More information about the llvm-commits
mailing list