link script PROVIDE bugfix

H. J. Lu hjl@lucon.org
Tue Aug 9 01:20:00 GMT 2005


On Tue, Aug 09, 2005 at 09:18:34AM +0930, Alan Modra wrote:
> On Fri, Aug 05, 2005 at 11:17:38AM -0700, H. J. Lu wrote:
> > > I think it is a very bad idea to miss use LARGE_SECTIONS for something
> > > else. That means it is very hard to add new bss/data sections. What is
> > > wrong with OTHER_BSS_SECTIONS?
> 
> It's hardly a misuse.  hbss is hppa64's "large section" bss.
> 
> > This is the patch to bring back OTHER_BSS_SECTIONS.
> 
> I made the change to reduce the number of link script variables.  Do you
> have some other use for OTHER_BSS_SECTIONS, beside that for hppa64?
> 

A project I am working on for ia32, ia64 and x86-64 uses additional
bss sections.

BTW, the current elf.sc has

  ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
  ${RELOCATING+. = ALIGN(${ALIGNMENT});}
  ${LARGE_SECTIONS}

That means OTHER_BSS_END_SYMBOLS may be set before bss sections in
LARGE_SECTIONS. My patch changes it to

  ${OTHER_BSS_SECTIONS}
  ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
  ${RELOCATING+. = ALIGN(${ALIGNMENT});}
  ${LARGE_SECTIONS}

It doesn't have this problem.

H.J.



More information about the Binutils mailing list