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: GNU LD: Linker script generating incorrect address


On Tue, May 21, 2013 at 10:08:51AM +0200, Jens Bauer wrote:
> I've read these (online):
>   <http://sourceware.org/binutils/docs/ld/index.html#Top>
>   (<http://sourceware.org/binutils/docs-2.23.1/ld/index.html>)
>   <http://info2html.sourceforge.net/cgi-bin/info2html-demo/info2html?(ld.info.gz)Expressions>
> -Are those the ones the same as the "ld info doc" ?

Yes.

> ($info ld does not give anything useful at my end)

Some distros don't install documentation unless you install
"development" packages.  It would of course be a good idea to read the
docs for your particular binutils.

> If they are, I've read the section about linker scripts 4 times now and still haven't come across any place explaining what not to do, regarding symbols.

It's not so much what not to do, but knowing that symbols can be
absolute or section relative.
http://sourceware.org/binutils/docs/ld/Expression-Section.html#Expression-Section
has some examples and goes into some detail on how ld evaluates
expressions.  Unfortunately the rules are not simple, mainly due to
wanting some level of backwards compatibility with older versions of
ld.

-- 
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]