Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: linking problems
@ 1997-05-01 17:58 Erik Evensen
  0 siblings, 0 replies; 5+ messages in thread
From: Erik Evensen @ 1997-05-01 17:58 UTC (permalink / raw)


This seems to be becoming something of a FAQ. Search for relocation
in the redhat archive and you will find the answer. The short 
answer is that you need break things up into shared libraries:

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

Then be sure to put the library somewhere where the loader will look
for it, or set the LD_LIBRARY_PATH env variable to include the path 
to the shared lib.

Good luck!!!

--erik

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* linking problems
@ 1997-05-01 18:45 Lee Hetherington
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Hetherington @ 1997-05-01 18:45 UTC (permalink / raw)


I'm experience some linking problems on alpha/linux that I never ran
into on other Unixes including x86/linux.

I'm getting errors of the following form in Red Hat 4.1 on a (large)
program of my own:

/usr/lib/crtend.o: In function `__do_global_ctors_aux':
../sysdeps/alpha/elf/crtend.S:73: relocation truncated to fit: LITERAL
__CTOR_END__
../sysdeps/alpha/elf/crtend.S:73: relocation truncated to fit: LITERAL
__do_global_ctors_aux
/usr/local/src/nist/2.5/lib/libnist_util.a(err_util.o): In function
`print_return_status':
err_util.c(.text+0x114): relocation truncated to fit: LITERAL $C37
err_util.c(.text+0x130): relocation truncated to fit: LITERAL $C38
err_util.c(.text+0x14c): relocation truncated to fit: LITERAL $C39
err_util.c(.text+0x168): relocation truncated to fit: LITERAL $C40
err_util.c(.text+0x170): relocation truncated to fit: LITERAL
static_error_util_message
/usr/local/src/nist/2.5/lib/libnist_util.a(err_util.o): In function
`get_return_status_message':
err_util.c(.text+0x220): relocation truncated to fit: LITERAL
static_error_util_buffer
err_util.c(.text+0x224): relocation truncated to fit: LITERAL
static_error_util_message

I'm wondering if I have exceeded some size threshold for some segment of
the executable and if there is some ld parameter I can use to get past
it.  Note that if I reduce the size of my program (by reducing how much
of my code I refer to and thus link it), I get a successful link. 
However, once I exceed some threshold I can't link.

Anyone have any ideas?  Thanks in advance.

--
Lee Hetherington
ilh@sls.lcs.mit.edu

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linking problems
       [not found] <3368E4E4.745383B2@sls.lcs.mit.edu>
@ 1997-05-01 20:20 ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 1997-05-01 20:20 UTC (permalink / raw)


> I'm wondering if I have exceeded some size threshold for some segment of
> the executable

Yes, the .got.

> and if there is some ld parameter I can use to get past it.

No.  But there is a new ld that does not have the limitation.
This should really be FAQ at this point.

There are RPMs of the new binutils, together with glibc and
gcc which must be updated simultaneously due to a bug in the
assembler.  Plus you must recompile all of the object files
and static libraries you intend to use.

The new RPMs are at ftp://ftp.redhat.com/pub/alphabits/.

r~

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linking problems
       [not found] <199705012020.PAA15199@stommel.tamu.edu>
@ 1997-05-01 20:44 ` Lev D Gelb
  0 siblings, 0 replies; 5+ messages in thread
From: Lev D Gelb @ 1997-05-01 20:44 UTC (permalink / raw)


> There are RPMs of the new binutils, together with glibc and
> gcc which must be updated simultaneously due to a bug in the
> assembler.  Plus you must recompile all of the object files
> and static libraries you intend to use.
> 
> The new RPMs are at ftp://ftp.redhat.com/pub/alphabits/.
> 
> r~
> 
Will these RPM's work as updates to the 4.1 distribution (with 2.0.27
kernel) or do I need a new kernel, modules, and milo as well?

Lev

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linking problems
       [not found] <Pine.A41.3.95.970501164416.60022D-100000@hal.cheme.cornell.edu>
@ 1997-05-02  5:52 ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 1997-05-02  5:52 UTC (permalink / raw)


> Will these RPM's work as updates to the 4.1 distribution (with 2.0.27
> kernel) or do I need a new kernel, modules, and milo as well?

They are independant of the kernel.

r~

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-05-02  5:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.A41.3.95.970501164416.60022D-100000@hal.cheme.cornell.edu>
1997-05-02  5:52 ` linking problems Richard Henderson
     [not found] <199705012020.PAA15199@stommel.tamu.edu>
1997-05-01 20:44 ` Lev D Gelb
     [not found] <3368E4E4.745383B2@sls.lcs.mit.edu>
1997-05-01 20:20 ` Richard Henderson
1997-05-01 18:45 Lee Hetherington
  -- strict thread matches above, loose matches on Subject: below --
1997-05-01 17:58 Erik Evensen

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