[PATCH] D117233: [llvm-objcopy] Preserve ARM and AArch64 mapping symbols

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 13:14:38 PST 2022


MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-arm.test:4
+# RUN: llvm-objcopy --strip-unneeded %t.o %t1.o
+# RUN: llvm-nm --special-syms %t1.o | FileCheck %s
+# RUN: llvm-objcopy --discard-all %t.o %t2.o
----------------
`llvm-nm -j --special-syms %t1.o | FileCheck %s --match-full-lines`


================
Comment at: llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp:256
+    // Mapping symbols should be preserved for a relocatable object file.
+    return Obj.isRelocatable() ? isAArch64MappingSymbol(Sym) : false;
+  case EM_ARM:
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117233/new/

https://reviews.llvm.org/D117233



More information about the llvm-commits mailing list