I tried to use gold instead of the standard GNU ld in our SW build system. I stumbled over the fact that gold gives me a script parse error for a ".a" script file containing INPUT().
Here is a stripped down example to reproduce the problem: $ cat hello.c #include <stdio.h> int main(int argc, char **argv) { printf("Hello, world!\n"); } $ gcc -o hello.o -c hello.c $ ld -r -o hello.a hello.o $ (echo 'INPUT('; echo hello.a; echo ')') >final.a $ cat final.a INPUT ( hello.a ) GNU ld: $ ld -o final final.a ld: warning: cannot find entry symbol _start; defaulting to 0000000008048074 hello.a: In function `main': (.text+0x24): undefined reference to `puts' Gold: $ build/gold/ld-new -o final final.a build/gold/ld-new: final.a:1:1: syntax error, unexpected INPUT, expecting $end build/gold/ld-new: final.a: not an object or archive $ build/gold/ld-new -o final --script final.a build/gold/ld-new: final.a:1:1: syntax error, unexpected INPUT, expecting $end build/gold/ld-new: unable to parse script file final.a I know that I could replace this example with a @-file but we use at least one commercial tool that feeds the linker with an input file that contains INPUT(). -- Summary: Script parse error on INPUT ( ) Product: binutils Version: 2.19 Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: ian at airs dot com ReportedBy: stefan dot becker at nokia dot com CC: bug-binutils at gnu dot org GCC host triplet: i386-redhat-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=7088 ------- 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