[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 16:59:32 PDT 2018
alexshap added a comment.
yeah, the behavior of --keep-symbol is more complicated than what's going on here.
In particular,
main.c
__attribute__((section(".data.foo"))) int xx= 1;
int yy() { return 239; }
objcopy --keep-symbol xx --remove-section .data.foo main.o main2.o
objcopy: main1.o: symbol `xx' required but not present
objcopy:main1.o: No symbols
[alexshap at devvm ~/local] echo $?
1
so probably the exit code should not be 0, error reporting can be better, though, than what binutils objcopy has to offer.
@paulsemel , can you send fix (looks like it's not that involved to fix it) ? otherwise i can send a patch for review myself . cc: @jakehehrlich
Repository:
rL LLVM
https://reviews.llvm.org/D46819
More information about the llvm-commits
mailing list