From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geoff Keating To: ian@zembu.com Cc: rth@cygnus.com, binutils@sourceware.cygnus.com Subject: Re: Trivial patch for elf.sc in ld. Date: Tue, 28 Sep 1999 21:50:00 -0000 Message-id: <199909290437.OAA00961@gluttony.geoffk.wattle.id.au> References: <199909271111.VAA01659@gluttony.geoffk.wattle.id.au> <19990928012326.5064.qmail@daffy.airs.com> <199909280353.NAA01148@gluttony.geoffk.wattle.id.au> <19990928132506.5955.qmail@daffy.airs.com> <199909290348.NAA00671@gluttony.geoffk.wattle.id.au> <19990929035848.20463.qmail@daffy.airs.com> X-SW-Source: 1999-09/msg00197.html > Date: 28 Sep 1999 23:58:48 -0400 > From: Ian Lance Taylor > CC: rth@cygnus.com, binutils@sourceware.cygnus.com > > Date: Wed, 29 Sep 1999 13:48:05 +1000 > From: Geoff Keating > > 1999-09-29 Geoffrey Keating > > * scripttempl/elf.sc (.rel.sdata): Combine all the sdata relocs. > (.rela.sdata): Likewise. > (.rel.sbss): Likewise. > (.rela.sbss): Likewise. > (.sdata): Don't include .gnu.linkonce.s.* or .sdata.* when > ld -r. > (.sbss): Do the same things as for .bss. > > Your patch introduces some things you didn't mention in the ChangeLog > entry: SDATA_START_SYMBOLS and .dynsbss. I don't know why you need > either of them. .dynsbss in particular sounds odd; does anything > create that section? It's created by at least the powerpc linker (which doesn't use this ldscript), and I expect it needs to be created by every ELF target with shared libraries and .sdata. It's needed when you have extern int foo; /* do something with foo */ in an application and 'foo' is in a shared library and an 'extern int' would usually be in the sdata section; you'd normally put such a symbol in .dynbss. SDATA_START_SYMBOLS is just there for consistency. -- Geoffrey Keating