This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: PATCH for more IRIX6 changes to elf32-mips.c
- To: Mark Mitchell <mark@codesourcery.com>
- Subject: Re: PATCH for more IRIX6 changes to elf32-mips.c
- From: Richard Henderson <rth@cygnus.com>
- Date: Mon, 28 Jun 1999 10:17:36 -0700
- Cc: binutils@sourceware.cygnus.com
- References: <19990627170627J.mitchell@codesourcery.com>
On Sun, Jun 27, 1999 at 05:06:27PM -0700, Mark Mitchell wrote:
> + /* On IRIX5, we omit the .options section. On IRIX6, however, we
> + included it, even though we don't process it quite right. (Some
> + entries are supposed to be merged.) Emprically, we seem to be
> + better off including it then not. */
> + if (IRIX_COMPAT (abfd) == ict_irix5)
> + for (secpp = &abfd->sections; *secpp != NULL; secpp = &(*secpp)->next)
> + {
> + if (strcmp ((*secpp)->name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) == 0)
> + {
> + for (p = (*secpp)->link_order_head; p != NULL; p = p->next)
> + if (p->type == bfd_indirect_link_order)
> + p->u.indirect.section->flags &=~ SEC_HAS_CONTENTS;
> + (*secpp)->link_order_head = NULL;
> + *secpp = (*secpp)->next;
> + --abfd->section_count;
> +
> + break;
> + }
> + }
I realize you're just conditionalizing existing code, but: I think
this should be done well before final_link. Perhaps in the
always_size_sections hook, and using _bfd_strip_section_from_output.
> + s->contents
> + = (unsigned char *) ELF_DYNAMIC_INTERPRETER (output_bfd);
The canonical type is bfd_byte.
r~