[PATCH] D46819: [llvm-objcopy] Add --keep-symbol (-K) option
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 15 15:32:16 PDT 2018
alexshap added a comment.
btw, i've looked at the code one more time, it seems to me it's not completely correct, the situation is a bit more subtle.
For example,
main.c:
int xx= 1;
int yy() { return 239; }
gcc -g -c main.c -o main.o
cp main.o _main.o
objcopy --keep-symbol=xx --strip-all main.o -o main2.o
llvm-objcopy --keep-symbol=xx --strip-all _main.o -o _main2.o
llvm-objcopy will entirely wipe out the symbols table, the logic appears to be wrong
(bintuils objcopy does the right thing at the same time)
Repository:
rL LLVM
https://reviews.llvm.org/D46819
More information about the llvm-commits
mailing list