summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
-rw-r--r--llvm/tools/llvm-objcopy/llvm-objcopy.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
index bbd21d58823..0563af93290 100644
--- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
+++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
@@ -292,9 +292,7 @@ void HandleArgs(const CopyConfig &Config, Object &Obj, const Reader &Reader,
return true;
}
- // TODO: We might handle the 'null symbol' in a different way
- // by probably handling it the same way as we handle 'null section' ?
- if (Config.StripUnneeded && !Sym.Referenced && Sym.Index != 0 &&
+ if (Config.StripUnneeded && !Sym.Referenced &&
(Sym.Binding == STB_LOCAL || Sym.getShndx() == SHN_UNDEF) &&
Sym.Type != STT_FILE && Sym.Type != STT_SECTION)
return true;
OpenPOWER on IntegriCloud