hanchenye-llvm-project/lld/test
Fangrui Song 4ce56b8122 [ELF] Add -z dead-reloc-in-nonalloc=<section_glob>=<value>
... to customize the tombstone value we use for an absolute relocation
referencing a discarded symbol. This can be used as a workaround when
some debug processing tool has trouble with current -1 tombstone value
(https://bugs.chromium.org/p/chromium/issues/detail?id=1102223#c11 )

For example, to get the current built-in rules (not considering the .debug_line special case for ICF):

```
-z dead-reloc-in-nonalloc='.debug_*=0xffffffffffffffff'
-z dead-reloc-in-nonalloc=.debug_loc=0xfffffffffffffffe
-z dead-reloc-in-nonalloc=.debug_ranges=0xfffffffffffffffe
```

To get GNU ld (as of binutils 2.35)'s behavior:

```
-z dead-reloc-in-nonalloc='*=0'
-z dead-reloc-in-nonalloc=.debug_ranges=1
```

This option has other use cases. For example, if we want to check
whether a non-SHF_ALLOC section has dead relocations.
With this patch, we can run a regular LLD and run another with a special
-z dead-reloc-in-nonalloc=, then compare their output.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D83264
2020-07-08 10:15:16 -07:00
..
COFF [X86] Enable multibyte NOPs in 64-bit mode for padding/alignment. 2020-07-01 23:59:01 -07:00
ELF [ELF] Add -z dead-reloc-in-nonalloc=<section_glob>=<value> 2020-07-08 10:15:16 -07:00
MachO [lld-macho] Support binding dysyms to any section 2020-07-02 21:21:01 -07:00
MinGW [LLD/MinGW]: Expose --thinlto-cache-dir 2020-05-24 12:30:56 +03:00
Unit Revert "Temporarily revert "build: use `find_package(Python3)` if available"" 2020-04-29 01:38:08 +00:00
darwin
mach-o ld64.lld: Make janky support for tbd files actually work sometimes 2020-07-02 15:31:21 -04:00
wasm [WebAssembly] 64-bit memory limits 2020-07-06 12:40:45 -07:00
CMakeLists.txt [lld-macho] Use export trie instead of symtab when linking against dylibs 2020-05-09 20:56:22 -07:00
lit.cfg.py
lit.site.cfg.py.in Revert "Temporarily revert "build: use `find_package(Python3)` if available"" 2020-04-29 01:38:08 +00:00