1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/tools/llvm-objcopy
James Henderson 1bd484c2b8 [llvm-objcopy]Don't implicitly strip sections in segments
This patch changes llvm-objcopy's behaviour to not strip sections that
are in segments, if they otherwise would be due to a stripping operation
(--strip-all, --strip-sections, --strip-non-alloc). This preserves the
segment contents. It does not change the behaviour of --strip-all-gnu
(although we could choose to do so), because GNU objcopy's behaviour in
this case seems to be to strip the section, nor does it prevent removing
of sections in segments with --remove-section (if a user REALLY wants to
remove a section, we should probably let them, although I could be
persuaded that warning might be appropriate). Tests have been added to
show this latter behaviour.

This fixes https://bugs.llvm.org/show_bug.cgi?id=41006.

Reviewed by: grimar, rupprecht, jakehehrlich

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

llvm-svn: 356129
2019-03-14 10:20:27 +00:00
..
COFF [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includes 2019-03-13 23:40:16 +00:00
ELF [llvm-objcopy]Don't implicitly strip sections in segments 2019-03-14 10:20:27 +00:00
MachO [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includes 2019-03-13 23:40:16 +00:00
Buffer.cpp [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includes 2019-03-13 23:40:16 +00:00
Buffer.h [llvm-objcopy] Fix crash when writing empty binary output 2019-01-28 15:02:40 +00:00
CMakeLists.txt [llvm-objcopy] Add ability to copy MachO object files 2019-02-02 00:38:07 +00:00
CopyConfig.cpp [llvm-objcopy] Cleanup errors from CopyConfig and remove llvm-objcopy.h dependency 2019-03-13 22:26:01 +00:00
CopyConfig.h [llvm-objcopy] Add --set-start, --change-start and --adjust-start 2019-02-26 09:24:22 +00:00
llvm-objcopy.cpp [llvm-objcopy][NFC] More error cleanup 2019-02-21 17:05:19 +00:00
llvm-objcopy.h Small refactoring of FileError. NFC. 2019-02-11 09:49:37 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjcopyOpts.td [llvm-objcopy]Don't implicitly strip sections in segments 2019-03-14 10:20:27 +00:00
StripOpts.td [llvm-objcopy]Don't implicitly strip sections in segments 2019-03-14 10:20:27 +00:00