This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: New bfd elf hook: force naming of local section symbols
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: binutils at sources dot redhat dot com,Rainer Orth <ro at techfak dot uni-bielefeld dot de>
- Date: Mon, 9 Feb 2004 15:25:52 +1030
- Subject: Re: New bfd elf hook: force naming of local section symbols
- References: <87oes9y8gb.fsf@redhat.com>
On Sun, Feb 08, 2004 at 02:03:32PM +0000, Richard Sandiford wrote:
> OK, I know this is lame, but I'd like to add a hook to force
> swap_out_syms() to name local section symbols. Besides the
> obvious file bloat, is there any reason why this would be
> a bad thing?
I don't think so. Any place in bfd or the linker that depends on a
section symbol having a zero name is broken.
> The reason I need the hook is to work around a bug in the MIPSpro
> linker.
Hmm, do we care about broken third party tools? I guess so..
> * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
> * elf.c (swap_out_syms): Use it to decide whether local section
> symbols should be named.
> * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
> * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
> (elf_backend_name_local_section_symbols): Define.
> * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
OK.
--
Alan Modra
IBM OzLabs - Linux Technology Centre