Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <richard@atheist.tamu.edu>
Subject: Re: Compile (Linker) Problem: relocation truncated to fit
Date: Thu, 24 Oct 1996 10:52:07 -0500 (CDT)	[thread overview]
Message-ID: <199610241552.KAA13416@atheist.tamu.edu> (raw)
In-Reply-To: <9610241429.ZM15260@fabsoft2.zarm.uni-bremen.de>

> Trying to Compile Xemacs in my avanti i get many messages :
> relocation truncated to fit: LITERAL ....
> in the final link stage. The messages are all refering to functions that
> are defined in static libaries. 

With small programs, that is a sign of having linked ECOFF object
files into the ELF executable.  However, I've recently had two reports
of very large programs (CLAPACK and a recent g++ snapshot) exceeding
the maximum .got segment size also yielding this message.

The current ELF linker implements .got compression, which cuts a third
to a half of the size off the ECOFF .lita size, but does not allow
multiple .got subsections.  That was a bit o' nastiness I didn't want
to fool with and I thought I'd gotten away with it when the X server
linked with room to spare.  Suffice to say that I am now working on it.

As a workaround, you should be able to get things to work by turning
the static libraries into shared libraries and sticking them in the
Xemacs libexec bin directory.  This because each library gets its own
.got section and so effectively achives the desired result of multiple
sections for the application.

The former operation would be like so:

  ld -shared -o libfoo.so --whole-archive libfoo.a --no-whole-archive

and the latter like

  gcc -o xemacs -Wl,-rpath,/usr/libexec/emacs/version/alpha-linux ...

Oh, and you'll need to do the build like 

  LD_LIBRARY_PATH=path make 

where path is a colon separated path to the directories of the .so
files in the build directory.  This because emacs will need them to
load while it dumps itself.

r~

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

      reply	other threads:[~1996-10-24 15:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-24 12:29 Compile (Linker) Problem: relocation truncated to fit Zarmfab Software Development
1996-10-24 15:52 ` Richard Henderson [this message]
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