This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH] Fail on erroneous linker script


On Sun, Dec 06, 2009 at 10:51:41PM -0500, Hans-Peter Nilsson wrote:
> On Mon, 7 Dec 2009, Alan Modra wrote:
> > On Fri, Dec 04, 2009 at 08:03:42PM +0300, Maxim Kuvyrkov wrote:
> > > In most valid cases NOBITS sections (.bss, usually) are placed at the
> > > end of the loaded segments.  However, if a user provides a custom linker
> > > scripts which puts, a .bss section in the middle of the data segment,
> > > the linker will produce a broken binary.  The proper behavior for linker
> > > is to fail with appropriate error message.
> >
> > We could also treat such NOBITS sections as if they were PROGBITS.
> > Like the following untested patch.  What do you think?
> 
> Undecided, except, shouldn't you rather use the fill value if
> one is defined by the linker script?

No.  You should do the same as the program loader does, which is zero
fill.

-- 
Alan Modra
Australia Development Lab, IBM


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