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: elf.sc and shared library for binutils


   From: hjl@nynexst.com (H.J. Lu)
   Date: Sat, 25 Feb 95 17:06:41 EST

   Here are some comments from elf.sc:

     /* Adjust the address for the data segment.  We want to adjust up to
	the same address within the page on the next page up.  It would
	be more correct to do this:
	  ${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE})
		   + ((ALIGN(8) + ${MAXPAGESIZE} - ALIGN(${MAXPAGESIZE}))
		      & (${MAXPAGESIZE} - 1)};}

   I think the correct one should be

	  ${RELOCATING+. = ALIGN(${MAXPAGESIZE})
		   + ((ALIGN(8) + ${MAXPAGESIZE} - ALIGN(${MAXPAGESIZE}))
		      & (${MAXPAGESIZE} - 1)};}

   It should be independent of DATA_ADDR.

I believe that it should depend upon DATA_ADDR if it is set.  Note
that most targets do not set DATA_ADDR.  However, Irix 5 does set
DATA_ADDR.  On Irix 5, unlike most ELF targets, the .data section
always starts at 0x10000000.  I think the GNU linker may as well be
compatible.

In any case, since DATA_ADDR is not normally set, why bother to make
this change?

   I have been adding the ELF shared library support for binutils under
   Linux for a while. Any chance to support it in the official source?

Yes, I would think so.  I was not aware that there was any shared
library support that was not in the FSF sources.  What sort of stuff
is it?

Ian