Better default for elf_backend_section_from_shdr
Alan Modra
amodra@bigpond.net.au
Wed Mar 2 03:22:00 GMT 2005
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
More information about the Binutils
mailing list