* Strange linking error
@ 2006-07-12 22:17 Erik Leunissen
2006-07-15 13:01 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Erik Leunissen @ 2006-07-12 22:17 UTC (permalink / raw)
To: binutils
I perceive an incompatibility with the following linker options when
linking an object file into a shared object (ELF):
--fatal-warnings
-Map somefilename (or -M)
When supplying either, the link succeeds, and the link map is written.
In the case of "--fatal-warnings" being supplied (without -Map), there
are no warnings written to stdout or stderr.
In the case of "-Map" being supplied (without --fatal-warnings), there
are also no warnings written to stdout or stderr.
When supplying both[*], the link fails, the link map is written
(identical contents as the successful case), and the following error is
emitted:
"collect2: ld returned 1 exit status"
This error message does not say why the exit status is 1, so here is
where I get lost. Does anybody have a clue what's going on?
Thanks in advance,
Erik Leunissen
[*] below you find the complete invocation of "gcc -v" from make:
gcc -v -shared -Wl,-O2,-x,--fatal-warnings,-s,-Map,./linkmap.$$ -o
/home/erik/Develop/stealth/bin/linux-x86/foo.so
/home/erik/Develop/stealth/bin/linux-x86/foo.o
-Wl,-Bstatic,-L/usr/local/lib,-ltclstub8.4 -Wl,-Bdynamic
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.1/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib
--enable-languages=c,c++,f77,objc,java,ada --disable-checking
--enable-libgcj --with-gxx-include-dir=/usr/include/g++
--with-slibdir=/lib --with-system-zlib --enable-shared
--enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.1 (SuSE Linux)
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/collect2 --eh-frame-hdr -m
elf_i386 -shared -o /home/erik/Develop/stealth/bin/linux-x86/foo.so
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../crti.o
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/crtbeginS.o
-L/usr/lib/gcc-lib/i586-suse-linux/3.3.1
-L/usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../../i586-suse-linux/lib
-L/usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../.. -O2 -x
--fatal-warnings -s -Map ./linkmap.8837
/home/erik/Develop/stealth/bin/linux-x86/foo.o -Bstatic -L/usr/local/lib
-ltclstub8.4 -Bdynamic -lgcc -lc -lgcc
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/crtendS.o
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../crtn.o
collect2: ld returned 1 exit status
make: *** [/home/erik/Develop/stealth/bin/linux-x86/foo.so] Error 1
== end of message ==
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Strange linking error
2006-07-12 22:17 Strange linking error Erik Leunissen
@ 2006-07-15 13:01 ` Alan Modra
2006-07-17 15:42 ` Erik Leunissen
0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2006-07-15 13:01 UTC (permalink / raw)
To: Erik Leunissen; +Cc: binutils
On Thu, Jul 13, 2006 at 12:17:05AM +0200, Erik Leunissen wrote:
> I perceive an incompatibility with the following linker options when
> linking an object file into a shared object (ELF):
>
> --fatal-warnings
> -Map somefilename (or -M)
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=609
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Strange linking error
2006-07-15 13:01 ` Alan Modra
@ 2006-07-17 15:42 ` Erik Leunissen
0 siblings, 0 replies; 3+ messages in thread
From: Erik Leunissen @ 2006-07-17 15:42 UTC (permalink / raw)
To: Erik Leunissen, binutils
Alan Modra wrote:
> On Thu, Jul 13, 2006 at 12:17:05AM +0200, Erik Leunissen wrote:
>> I perceive an incompatibility with the following linker options when
>> linking an object file into a shared object (ELF):
>>
>> --fatal-warnings
>> -Map somefilename (or -M)
>
> See http://sources.redhat.com/bugzilla/show_bug.cgi?id=609
>
Right.
Thanks,
Erik
====
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-07-17 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-12 22:17 Strange linking error Erik Leunissen
2006-07-15 13:01 ` Alan Modra
2006-07-17 15:42 ` Erik Leunissen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).