This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH for N32 ABI


   From: Mark Mitchell <mark@codesourcery.com>
   Date: Tue, 29 Jun 1999 00:50:00 -0700

   This patch represents the balance of the work necessary to get GNU ld
   working with the N32 ABI.  A GCC configured --with-gnu-ld for the
   resulting linker bootstraps sucessfully and to pass all regression
   tests.

This patch is basically OK with me.  I'm basically trusting that it
does the right thing.  Does anybody else have any comments?

   The major changes in this patch are:

     o Total rewrite of relocation processing.  This is necessary because
       the N32 ABI allows multiple relocations for the same address.  The
       idea is that you perform one relocation, and use it as the addend
       for the next.  Intermediate results may overflow the field width
       (even though the final result will not), so the traditional HOWTO
       approach doesn't really work; there, the computed value is written
       back after each computation.  I did not remove the
       HOWTO-processing functions yet; that would have just cluttered up
       the patch, and made it harder to fix problems that arise with the
       new scheme.  (As it stands, it's easy to find the original code.)
       Once the new scheme gets some testing, and the 64-bit ABI is
       implemented, it would make sense to pull out these functions.

Note that gas may use the HOWTO functions, so I wouldn't be in a real
big hurry to eliminate them.  They will also be used when generating
output in a different format, such as S-records, although that may not
work anyhow.

I assume you tested ld -r.

   +}
   +     
   +struct mips_elf_hash_sort_data
   +{

This struct should probably have a comment.

   +}
   +
   +static unsigned int
   +mips_elf_create_dynamic_relocation (output_bfd, info, rel, dynindx,
   +				    addend, input_section)

This function needs a comment.

   +  /* The linker script takes care of providing names and values for
   +     these, but we must place them into the right sections.  */
   +  static const char* text_section_symbols[] = {
   +    "_ftext",
   +    "_etext",
   +    "__dso_displacement",
   +    "__elf_header",
   +    "__program_header_table",
   +    NULL
   +  };
   +
   +  static const char* data_section_symbols[] = {
   +    "_fdata",
   +    "_edata",
   +    "_end",
   +    "_fbss",
   +    NULL
   +  };

I assume these arrays are const, as well as containing pointers to
const data; they should be marked as such.

Thanks.

Ian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]