[Bug gold/7088] New: Script parse error on INPUT ( )

2008-12-09 Thread stefan dot becker at nokia dot com
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 

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 08048074
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


[Bug gold/7088] Script parse error on INPUT ( )

2008-12-09 Thread ian at airs dot com

--- Additional Comments From ian at airs dot com  2008-12-09 16:12 ---
Not handling INPUT was an oversight.  I committed a patch to fix it.  Thanks for
reporting the bug.

http://sourceware.org/ml/binutils/2008-12/msg00126.html

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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