From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11789 invoked by alias); 12 Jul 2006 22:17:21 -0000 Received: (qmail 11775 invoked by uid 22791); 12 Jul 2006 22:17:20 -0000 X-Spam-Check-By: sourceware.org Received: from smtp30.hccnet.nl (HELO smtp30.hccnet.nl) (62.251.0.40) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Jul 2006 22:17:13 +0000 Received: from [192.168.0.151] by smtp30.hccnet.nl via [80.100.236.49] with ESMTP for id k6CMH6sf029867 (8.13.6/2.05); Thu, 13 Jul 2006 00:17:07 +0200 (MEST) Message-ID: <44B574E1.50908@hccnet.nl> Date: Wed, 12 Jul 2006 22:17:00 -0000 From: Erik Leunissen User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: binutils@sourceware.org Subject: Strange linking error Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00167.txt.bz2 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 ==