Crux ==== I propose for ld to check that all the files it needs to read are available, including object files and libraries, at present ld exits after finding any single object file or library missing. Which doesn't indicate the extent of the missing files.
-- Would a patch be considered for review which added checks that all files exist? Detailed information ========== The present behaviour looks like ld drops out with exit(1) when it finds the first missing library or object file, example follows: $ g++ -Wall -shared -o t -lFooBar -lMissing -l12346789 -lMathsArc main.cpp /usr/bin/ld: cannot find -lFooBar collect2: ld returned 1 exit status g++ does check that object files exist, but not libraries it appears. If I call collect2 directly, it calls ld and we can see the missing test.o object file: $ /usr/lib/gcc/i486-linux-gnu/4.1.2/collect2 --eh-frame-hdr -m elf_i386 -shared -o t /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.1.2/crtbeginS.o -L/usr/lib/gcc/i486-linux-gnu/4.1.2 -L/usr/lib/gcc/i486-linux-gnu/4.1.2 -L/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib test.o test2.o -lFooBar -lMissing -l12346789 -lMathsArc /tmp/ccIyZv2e.o -lstdc++ -lm -lgcc_s -lc -lgcc_s -lfoo /usr/lib/gcc/i486-linux-gnu/4.1.2/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crtn.o /usr/bin/ld: test.o: No such file: No such file or directory collect2: ld returned 1 exit status The proposed revision would change the first example's output to be as follows: $ g++ -Wall -shared -o t -lFooBar -lMissing -l12346789 -lMathsArc main.cpp /usr/bin/ld: cannot find -lMissing /usr/bin/ld: cannot find -l12346789 /usr/bin/ld: cannot find -lMathsArc collect2: ld returned 1 exit status -- Summary: ld check all files are present and indicate those missing Product: binutils Version: 2.17 Status: NEW Severity: enhancement Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: jg at jguk dot org CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=4437 ------- 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