public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o
@ 2006-05-16 15:28 Etienne Lorrain
  2006-05-16 22:39 ` Alan Modra
  0 siblings, 1 reply; 12+ messages in thread
From: Etienne Lorrain @ 2006-05-16 15:28 UTC (permalink / raw)
  To: binutils

  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

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o
@ 2006-05-16 22:37 Etienne Lorrain
  0 siblings, 0 replies; 12+ messages in thread
From: Etienne Lorrain @ 2006-05-16 22:37 UTC (permalink / raw)
  To: binutils

 Just to add that I get the same problem with "GNU ld version 2.16.92 20060416",
i.e.:
`.paramcode_linux_set_params' referenced in section `reloc_paramcode_section' of
vmlinuz.o: defined in discarded section `.paramcode_linux_set_params' of vmlinuz.o

 but now it terminate the link with error (did I smoke crack when I said 2.16.1
 was generating a result file? I then just check for the boot.map file).

 Just I have a new (and unrelated) warning for my link with this binutils pre-release:

warning: no memory region specified for loadable section `.rel.dyn'

 The section '.rel.dyn' is empty for my system, as said by boot.map:

 .rel.dyn        0x00000000        0x0
 .rel.text      0x00000000        0x0 boot.o
 .rel.rodata    0x00000000        0x0 boot.o
 .rel.text.start
                0x00000000        0x0 boot.o
 .rel.text.UI_function_init
                0x00000000        0x0 boot.o
 .rel.text.UI_init
                0x00000000        0x0 boot.o
 .rel.text.VESA_init
                0x00000000        0x0 boot.o
 ... and all others of zero size ...


  Thanks,
  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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-05-20  2:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-16 15:28 `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o Etienne Lorrain
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

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).