Thanks! I don't understand your changes at all off hand, and I strongly
suspected that the patch I tried was too simple-minded to be right.
Thanks,
Roland
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-bin
Consider:
% head ref.s def.s
==> ref.s <==
.data
ptrsym:
.long badsym
.section .gnu.warning.badsym,"",@progbits
.string "badsym warning"
==> def.s <==
.comm badsym,4
% as --32 -o ref.o ref.s
Given:
$ gcc -c -xc <(echo '_start(){}') -o start.o
$ ar cq libstart.a start.o
$ ./gold/ld-new -o foo libstart.a
The output file foo is an empty ELF file.
With:
$ ./gold/ld-new -o foo -e _start libstart.a
./gold/ld-new: warning: cannot find entry symbol '_
I am seeing a strange thing. The (BFD) linker spuriously generates .plt
and .rela.plt sections (both empty) for a link that has no need for them.
It's reproduced with a trivial example, and seen on today's binutils trunk.
Gold does not produce the empty sections.
Empty sections are normally harml