gold cannot handle _start in a library

2011-05-25 Thread Roland McGrath
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 '_

Re: gold cannot handle _start in a library

2011-05-24 Thread Ian Lance Taylor
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