diff options
| author | Fangrui Song <i@maskray.me> | 2022-06-16 23:33:48 -0700 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2022-06-16 23:33:48 -0700 |
| commit | c324c938becdbb963b34895cc12ffccb261bf167 (patch) | |
| tree | 67b2305c4c681153f2ca5bdbd3fca8d75b540c33 /lldb/source/Plugins/ScriptInterpreter/Python | |
| parent | 0d2dde20be14e42a26280fd80b78f09edf7befe6 (diff) | |
| download | llvm-c324c938becdbb963b34895cc12ffccb261bf167.zip llvm-c324c938becdbb963b34895cc12ffccb261bf167.tar.gz llvm-c324c938becdbb963b34895cc12ffccb261bf167.tar.bz2 | |
[Driver] Pass -X to ld for riscv*-{elf,freebsd,linux}
GNU ld has a hack that defaults to -X (--discard-locals) in the emulation file
`riscvelf.em`. The recommended way, as gcc/config/arm does, is to let the
compiler driver pass -X to ld.
(The motivation is likely to discard a plethora of `.L` symbols due to linker
relaxation.)
lld default to --discard-none. To make clang+lld match GNU ld's behavior, pass
-X to ld.
Note: GNU ld has a special rule to treat ld -r -s as ld -r -S -x. With -X, driver `-r -Wl,-s`
will behave as ld `-r -S -X`. This removes fewer symbols than `-r -S -x` but is safe.
Differential Revision: https://reviews.llvm.org/D127826
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions
