From: Etienne Lorrain <etienne_lorrain@yahoo.fr>
To: binutils@sourceware.org
Subject: `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o
Date: Tue, 16 May 2006 15:28:00 -0000 [thread overview]
Message-ID: <20060516113425.43587.qmail@web26913.mail.ukl.yahoo.com> (raw)
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
next reply other threads:[~2006-05-16 11:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 15:28 Etienne Lorrain [this message]
2006-05-16 22:39 ` Alan Modra
2006-05-16 22:47 ` Etienne Lorrain
2006-05-17 11:34 ` Alan Modra
2006-05-17 15:32 ` Fix regression introduced 2006-04-21 Alan Modra
2006-05-17 16:19 ` `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o Etienne Lorrain
2006-05-19 11:50 ` Alan Modra
2006-05-19 15:30 ` Etienne Lorrain
2006-05-19 15:37 ` Alan Modra
2006-05-19 15:57 ` Etienne Lorrain
2006-05-20 13:56 ` Alan Modra
2006-05-16 22:37 Etienne Lorrain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060516113425.43587.qmail@web26913.mail.ukl.yahoo.com \
--to=etienne_lorrain@yahoo.fr \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).