OSDN Git Service

Revert [llvm-objcopy] Allow strip symtab from executables and DSOs
authorJordan Rupprecht <rupprecht@google.com>
Wed, 10 Jul 2019 23:32:44 +0000 (23:32 +0000)
committerJordan Rupprecht <rupprecht@google.com>
Wed, 10 Jul 2019 23:32:44 +0000 (23:32 +0000)
commite8dc6a1139148c1e08bf7b76bd82894375cd5ff4
treef855caf57c73fce893a14c477c1e06d9f5b8c8a7
parent4b3ebe83325f20f408689e63d27837228ce06a46
Revert [llvm-objcopy] Allow strip symtab from executables and DSOs

This reverts r365193 (git commit 194f16b3548bcb23a7f0fd638778ed72edd18d37)

This patch doesn't work with binaries built w/ `--emit-relocs`, e.g.

```
$ echo 'int main() { return 0; }' | clang -Wl,--emit-relocs -x c - -o foo && llvm-objcopy --strip-unneeded foo
llvm-objcopy: error: 'foo': not stripping symbol '__gmon_start__' because it is named in a relocation
```

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365712 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objcopy/ELF/no-symbol-relocation.test
test/tools/llvm-objcopy/ELF/preserve-segment-contents-ehdr-phdrs.test
test/tools/llvm-objcopy/ELF/remove-multiple-sections.test
test/tools/llvm-objcopy/ELF/segment-shift-section-remove.test
test/tools/llvm-objcopy/ELF/segment-test-remove-section.test
test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test [deleted file]
tools/llvm-objcopy/ELF/ELFObjcopy.cpp
tools/llvm-objcopy/ELF/Object.cpp
tools/llvm-objcopy/ELF/Object.h