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 '_
Roland McGrath writes:
> 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: wa