Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: axp-list@redhat.com
Subject: Re: Alpha linker problems
Date: Sun, 26 Mar 2000 18:40:33 -0800	[thread overview]
Message-ID: <20000326184033.A23576@twiddle.net> (raw)
In-Reply-To: <200003261741.JAA26392@icarus.com>

On Sun, Mar 26, 2000 at 09:41:08AM -0800, Stephen Williams wrote:
> I don't understand what the .got section is, why it is limited to 64K
> and why my code so thoroughly overflows that section.

The .got section stores addresses of symbols.  It consists of a
number of subsections, each limited to 64k, because that's how
much one can address with one memory instruction.  Each object
file may reference only one of these subsections, thus each object
file is limited to 64k.

As to why your code requires so many symbol address loads, one
would have to examine the code to be sure.

Note that there are several techniques that can be applied to
reduce the number of symbol addresses needed by a program.  GCC
does not employ all of these, mostly because GAS lacks the ability
to emit all of the relocations.  Since CCC emits object files
directly, it does not suffer from this restriction.  You may have
better success with that.  Of course, Compaq's C++ compiler isn't
released yet, but I recently heard noises about "soon".

There are also .got reduction strategies that can be done at link
time.  You might try getting the most recent binutils (2.9.5.0.31?)
and using `g++ -Wl,-relax'.


r~


  parent reply	other threads:[~2000-03-27  2:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-26 17:41 Alpha linker problems Stephen Williams
2000-03-26 20:01 ` Greg Lindahl
2000-03-26 21:27   ` Stephen Williams
2000-03-26 21:41     ` Rich Payne
2000-03-26 22:50     ` Greg Lindahl
2000-03-26 23:30       ` tibor
2000-03-27  2:27         ` Rich Payne
2000-03-27  2:40 ` Richard Henderson [this message]
2000-03-27  4:42   ` Greg Lindahl
2000-03-27  5:00     ` Stephen Williams
2000-03-27  5:04       ` Greg Lindahl
2000-03-27 21:23       ` Richard Henderson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox