This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
bfd/elf.c(assign_section_numbers)
- From: Fabio Alemagna <falemagn at studenti dot unina dot it>
- To: <binutils at sources dot redhat dot com>
- Date: Thu, 6 Feb 2003 19:35:06 +0100 (CET)
- Subject: bfd/elf.c(assign_section_numbers)
Hello,
While waiting for a reply to my patch submission, here I'm exposing
another issue which needs to be solved somehow in the bfd/elf.c file.
The problem I'm facing is that I cannot use the "strip" command (nor
objcopy, of course) to strip an AROS executable because the sh_info fields
of the AROS-specific relocation sections are all zero'ed.
This happens because assign_section_numbers is called too late and after
any kind of callback is invoked by the backend, and hence there's no way
for me to tell the backend that a certain section has to have the sh_info
field filled with another section's index.
One solution would be to call assign_section_numbers() before
bfd_map_over_sections(..., elf_fake_sections, ...), in
bfd/elf.c:_bfd_elf_compute_section_file_positions().
Right now it looks like this:
failed = FALSE;
bfd_map_over_sections (abfd, elf_fake_sections, &failed);
if (failed)
return FALSE;
if (!assign_section_numbers (abfd))
return FALSE;
I don't think it would cause any arm if it looked like this:
if (!assign_section_numbers (abfd))
return FALSE;
failed = FALSE;
bfd_map_over_sections (abfd, elf_fake_sections, &failed);
if (failed)
return FALSE;
Please, give me feedback...
Regards,
Fabio Alemagna