It seems that when asked to extract symbols, objcopy cannot process ELF executables that were built with the "--emit-reloc" linker option. objcopy gives an "assertion failed" and exits. The error and the procedure used to generate it is as follows:
1. Create a very simple C program, test.c: #include <stdio.h> int main(int argc, char **argv) { return 0; } 2. Build it with relocation information kept in the final executable: $ gcc -o test -Wl,--emit-relocs test.c 3. Try to extract the symbols in a separate file: $ objcopy --extract-symbol test test_sym BFD: BFD (GNU Binutils for Ubuntu) 2.18.0.20080103 assertion fail ../../bfd/elf.c:5517 -- Summary: objcopy gives "assertion failed" when extracting symbols from ELF executables linked with "--emit-relocs" Product: binutils Version: 2.18 Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: stefan dot bucur at gmail dot com CC: bug-binutils at gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=6774 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils