1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/test/tools/llvm-objcopy
James Henderson e9c954f970 [llvm-objcopy][llvm-strip] Add switch to allow removing referenced sections
llvm-objcopy currently emits an error if a section to be removed is
referenced by another section. This is a reasonable thing to do, but is
different to GNU objcopy. We should allow users who know what they are
doing to have a way to produce the invalid ELF. This change adds a new
switch --allow-broken-links to both llvm-strip and llvm-objcopy to do
precisely that. The corresponding sh_link field is then set to 0 instead
of an error being emitted.

I cannot use llvm-readelf/readobj to test the link fields because they
emit an error if any sections, like the .dynsym, cannot be properly
loaded.

Reviewed by: rupprecht, grimar

Differential Revision: https://reviews.llvm.org/D60324

llvm-svn: 358649
2019-04-18 09:13:30 +00:00
..
COFF [llvm-strip] Hook up (unimplemented) --only-keep-debug 2019-03-14 21:51:42 +00:00
ELF [llvm-objcopy][llvm-strip] Add switch to allow removing referenced sections 2019-04-18 09:13:30 +00:00
Inputs [llvm-objcopy] [COFF] Fix handling of aux symbols for big objects 2019-01-23 11:54:51 +00:00
MachO tests: loosen restriction 2019-02-04 00:09:32 +00:00