diff options
| author | Alexander Shaposhnikov <shal1t712@gmail.com> | 2018-05-22 18:24:07 +0000 |
|---|---|---|
| committer | Alexander Shaposhnikov <shal1t712@gmail.com> | 2018-05-22 18:24:07 +0000 |
| commit | 6e7814c4848e95c0df484c7d283052f7258bc147 (patch) | |
| tree | 2dd519be2f733556f9f3505da14ec3c7e55959ec /llvm/tools/llvm-objcopy/Object.h | |
| parent | a6e63f176cdf2d7555938fcbb01781d29363feea (diff) | |
| download | bcm5719-llvm-6e7814c4848e95c0df484c7d283052f7258bc147.tar.gz bcm5719-llvm-6e7814c4848e95c0df484c7d283052f7258bc147.zip | |
[llvm-objcopy] Fix the behavior of --strip-* and --keep-symbol
If one runs llvm-objcopy --strip-all --keep-symbol foo
and the symbol table indeed contains the symbol "foo"
then it should not be removed.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D47052
llvm-svn: 333008
Diffstat (limited to 'llvm/tools/llvm-objcopy/Object.h')
| -rw-r--r-- | llvm/tools/llvm-objcopy/Object.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objcopy/Object.h b/llvm/tools/llvm-objcopy/Object.h index ac384c1fdfe..e4307794456 100644 --- a/llvm/tools/llvm-objcopy/Object.h +++ b/llvm/tools/llvm-objcopy/Object.h @@ -365,6 +365,7 @@ public: SectionBase *DefinedIn, uint64_t Value, uint8_t Visibility, uint16_t Shndx, uint64_t Sz); void addSymbolNames(); + bool empty() const { return Symbols.empty(); } const SectionBase *getStrTab() const { return SymbolNames; } const Symbol *getSymbolByIndex(uint32_t Index) const; void updateSymbols(function_ref<void(Symbol &)> Callable); |

