This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: The problem with linkonce sections in ELF


On Thu, Feb 03, 2000 at 11:09:24PM -0500, Ian Lance Taylor wrote:
>    Date: Thu, 3 Feb 2000 18:48:52 -0800
>    From: "H . J . Lu" <hjl@valinux.com>
> 
>    For some reason, linker decides to strip the input relocation
>    section, .rel.gnu.linkonce.t._._19srvr_message_list_c.
> 
> The linker always strips all input relocation sections.  That is
> correct behaviour.
> 
> I still don't understand what the actual problem is.
> 

The probelm is the output .rel.text section consists of .rel.text,
.rel.text.* and .rel.gnu.linkonce.t*. All the them are generated
by the linker. With -Bsymbolic, elf_i386_size_dynamic_sections calls

	if (info->shared && info->symbolic)
	  elf_i386_link_hash_traverse (elf_i386_hash_table (info),
				       elf_i386_discard_copies,
				       (PTR) NULL);

It is very possible that one of the .rel.gnu.linkonce.t* relocations
created by the linker will be striped by _bfd_strip_section_from_output.
When it happens, the output .rel.text section will be removed although
there are other .rel.text, .rel.text.* and .rel.gnu.linkonce.t* left.

I think _bfd_strip_section_from_output has to be 100% sure that
all linker generated relocations are striped before it removes
the output relocation section.


H.J.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]