[lld] [lld][MachO] Fix symbol insertion in `transplantSymbolsAtOffset` (PR #120737)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 10:45:01 PST 2024
alx32 wrote:
> It should fire with GCC, except GCC crashes before the `assert` is reached.
GCC doesn't crash without `-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON` - right ?
Does the assert fire with GCC without the `-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON` flag ?
> Yes, understood, but I'm still looking into the right way to modify alias-symbols.s. As mentioned https://github.com/llvm/llvm-project/pull/120737#issuecomment-2557400163, tips appreciated!
Currently I think `_weak_2` symbol is the one being inserted. I would either:
- Modify the `_weak_2` symbol to have a `value` of 1.
- Add another `_weak_3` that has the `value` of 1.
Given the tests have `.subsections_via_symbols` this will be a bit tricky - would need to play around with multiple options to get this to happen. It's not obvious what would work here.
https://github.com/llvm/llvm-project/pull/120737
More information about the llvm-commits
mailing list