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


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

Re: patches to add mips-dec-netbsd configuration


   From: "Arne H. Juul" <arnej@pvv.unit.no>
   Date: Mon, 18 Sep 1995 11:01:55 +0200

   Most of the patches only add recognizing the name to be handled
   like mips*el-*-elf.

I checked in versions of these patches.

   However, there is one patch to elf.c that modifies ld behaviour on
   linking: don't merge together readonly and writable object sections
   into one program segment.

It seems to me that this patch could cause trouble.  When the linker
script uses SIZEOF_HEADERS, as the default linker script does, the ELF
linker computes the program header size before it knows the final
positions of the sections.  That means that it must guess at the total
number of program segments which will be required.  Your patch will
cause the linker to sometimes allocate an additional program segment,
and in some cases that will not fit, causing a fatal error.

The right fix for this is rather complex: the linker must be able to
relax the final positions of the segments based on the number of
program header segments which are required, and vice-versa.

Ian