cat > a.c <<EOF extern int foo (void); int main (void) { return foo (); } EOF gcc -fpie -pie --unresolved-symbols=ignore-all a.c -o a segfaults in the linker on /* Since there's no PLT entry, Validate that this is locally defined. */ BFD_ASSERT (undef_weak_ref || sym_sec->output_section != NULL); (sym_sec is apparently NULL).
A patch is posted at http://sourceware.org/ml/binutils/2007-05/msg00129.html
"gcc -fpie -shared -pie" since -shared implies --unresolved-symbols=ignore-all.
Fixed by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=62d887d4067efbc5b757e03b0fa54f2a4c81befa