This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Better default for elf_backend_section_from_shdr
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 2 Mar 2005 13:52:32 +1030
- Subject: Re: Better default for elf_backend_section_from_shdr
- References: <87ekezj8er.fsf@codesourcery.com>
On Tue, Mar 01, 2005 at 02:41:48PM -0800, Zack Weinberg wrote:
> It seems to make more sense to set elf_backend_section_from_shdr to
> _bfd_elf_make_section_from_shdr. This causes such sections to be
> treated as generic, which is usually the right thing at least for
> inspection purposes. So I would like to apply the appended patch.
I agree. Please apply.
> Thoughts? Should this be done for the other
> elf_backend_section_from_* hooks too?
Definitely for elf_backend_section_from_phdr. See the default case in
elf.c:bfd_section_from_phdr. Please clean this up while you're at it,
to call the backend function unconditionally. Same in
bfd_section_from_shdr.
I don't think there is a sensible default for
elf_backend_section_from_bfd_section.
--
Alan Modra
IBM OzLabs - Linux Technology Centre