This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- Cc: binutils at sourceware dot org
- Date: Wed, 17 May 2006 00:31:45 +0930
- Subject: Re: `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o
- References: <20060516113425.43587.qmail@web26913.mail.ukl.yahoo.com>
On Tue, May 16, 2006 at 01:34:25PM +0200, Etienne Lorrain wrote:
> 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"
What is special about reloc_paramcode_section? ie. How are you managing
to confuse the linker into thinking the reference in that section is not
a normal use, which should result in linux_set_params being kept?
Do you have a small self-contained testcase?
--
Alan Modra
IBM OzLabs - Linux Technology Centre