From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5543 invoked by alias); 16 May 2006 11:34:42 -0000 Received: (qmail 5528 invoked by uid 22791); 16 May 2006 11:34:40 -0000 X-Spam-Check-By: sourceware.org Received: from web26913.mail.ukl.yahoo.com (HELO web26913.mail.ukl.yahoo.com) (217.146.177.80) by sourceware.org (qpsmtpd/0.31) with SMTP; Tue, 16 May 2006 11:34:27 +0000 Received: (qmail 43589 invoked by uid 60001); 16 May 2006 11:34:25 -0000 Message-ID: <20060516113425.43587.qmail@web26913.mail.ukl.yahoo.com> Received: from [80.168.43.100] by web26913.mail.ukl.yahoo.com via HTTP; Tue, 16 May 2006 13:34:25 CEST Date: Tue, 16 May 2006 15:28:00 -0000 From: Etienne Lorrain Subject: `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o To: binutils@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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-05/txt/msg00269.txt.bz2 Hello, While doing some automatic treatment (awk) of assembler files generated by GCC, i.e. converting ".code16gcc \n calll fct \n" by ".code16gcc \n lcallw *ptr_fct \n" I get this strange message (in the subject). It seems to be a warning because it does not seem to stop the link process, but it is not preceded by a "Warning:" prefix in stderr. The version of ld I am using: [etienne@localhost gujin]$ /home/etienne/projet/toolchain/bin/ld -v GNU ld version 2.16.1 The exact modification I ask awk to do (add the 4 following lines): 1362 .section reloc_paramcode_section 1363 .weak fptr_linux_set_params 1364 0000 00000000 fptr_linux_set_params: .long linux_set_params 1365 .previous 1366 .section .paramcode_linux_set_params,"ax",@progbits 1367 .p2align 1,,1 1369 linux_set_params: 1370 0000 6655 pushl %ebp # 1371 0002 6657 pushl %edi # 1372 0004 6656 pushl %esi # 1373 0006 6653 pushl %ebx # Plus an automatic transform of "call linux_set_params" by "lcallw *fptr_linux_set_params". I have already tried to use either ".globl fptr_linux_set_params" instead of ".weak fptr_linux_set_params". My problem is when the function (for instance) linux_set_params is not used at all in the link process, and is discarded because I am using GCC -ffunction-sections and LD --gc-sections, it is still referenced in ".section reloc_paramcode_section" which trigger this message: [etienne@localhost gujin]$ /home/etienne/projet/toolchain/bin/ld boot.o user.o debug.o library.o disk.o util.o gzlib.o kbd.o fs.o vmlinuz.o mouse.o main.o font.o -nostdlib -Tboot.lnk -Map=boot.map --sort-common --cref --warn-section-align --no-check-sections --gc-sections -o boot.elf /home/etienne/projet/toolchain/bin/ld: `.paramcode_linux_set_params' referenced in section `reloc_paramcode_section' of vmlinuz.o: defined in discarded section `.paramcode_linux_set_params' of vmlinuz.o Is there a trick to either not create symbol "fptr_linux_set_params:" in section "reloc_paramcode_section" or not display this message (losing the 4 bytes for this pointer is not a major problem). Thanks a lot, Etienne. ___________________________________________________________________________ Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services préférés : vérifiez vos nouveaux mails, lancez vos recherches et suivez l'actualité en temps réel. Rendez-vous sur http://fr.yahoo.com/set