c/7249: -Wl, and -Xlinker options to arm-aout-gcc

betoes@igbt.sel.eesc.sc.usp.br betoes@igbt.sel.eesc.sc.usp.br
Tue Jul 9 13:36:00 GMT 2002


>Number:         7249
>Category:       c
>Synopsis:       -Wl, and -Xlinker options to arm-aout-gcc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 09 13:06:30 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     betoes@igbt.sel.eesc.sc.usp.br
>Release:        unknown-1.0
>Organization:
>Environment:
Debian GNU/Linux i386
>Description:
I am using arm-aout cross compiler. I build it like that:

$ ./configure --target=arm-aout --prefix=/usr/local
$ make
# make install prefix=/usr/local

The system has (arm-aout-)binutils-2.9.5.0.37.

My problem regards about the -oformat linker options.
When passed throught the compiler front-end, 'arm-aout-gcc',
this option is being interpreted by it.
In this case, if I need an 'ihex' format, I will use:

$ arm-aout-gcc -nostdlib -Wl,-oformat -Wl,ihex -o foo foo.c

This command line will produce an error. In gcc-2.95 it 
 worked well. It seems that the option '-oformat' is beeing 
 expanded to '-o format' and then passed to the linker. The
error messages are:

/usr/local/lib/gcc-lib/arm-aout/3.1/../../../../arm-aout/bin/nm: format: No such file or directory
collect2: /usr/local/lib/gcc-lib/arm-aout/3.1/../../../../arm-aout/bin/nm returned 1 exit status

Doing the link by hand it works well:

$ arm-aout-gcc -c foo.c -o foo.o
$ arm-aout-ld -oformat ihex foo.o -o foo

>How-To-Repeat:
$ arm-aout-gcc -Wl,-oformat -Wl,ihex -o foo foo.c
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="foo.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo.c"

CWludCBfX21haW4oKSB7CglyZXR1cm47Cn0KaW50IG1haW4oKSB7CgkqICh2b2xhdGlsZSBjaGFy
ICopIDB4Mzc4ID0gJ2EnOwoJcmV0dXJuIDA7Cn0KCg==



More information about the Gcc-bugs mailing list