* Problem with Large Shared Libs?
@ 1998-09-09 20:30 Bret Orsburn
0 siblings, 0 replies; 14+ messages in thread
From: Bret Orsburn @ 1998-09-09 20:30 UTC (permalink / raw)
To: axp-list
Alpha Linux Wizards:
Is there a known problem with large shared C++ libraries under Alpha Linux?
(Redhat 5.0 and 5.1, egcs 1.0.2 and 1.1b, /lib/ld-2.0.7.so)
We've been seeing some runtime linkage errors involving very large libs, but I
haven't found a Smoking Gun yet....
----
Bret Orsburn
borsburn@codonics.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
@ 1998-09-09 22:21 Greg Lindahl
1998-09-10 7:36 ` Jochen Kuepper
0 siblings, 1 reply; 14+ messages in thread
From: Greg Lindahl @ 1998-09-09 22:21 UTC (permalink / raw)
To: axp-list
> Is there a known problem with large shared C++ libraries under Alpha Linux?
> (Redhat 5.0 and 5.1, egcs 1.0.2 and 1.1b, /lib/ld-2.0.7.so)
Um, if you could get large C++ programs to work at all under Alpha
Linux, you'd be ahead of me. At the least binutils has all kinds of
arbitrary limits, which are driving me crazy. But all that is before
runtime. I'm not sure if my current problems are due to the hacks to
get around the binutils problems, or a real g++ bug.
All my stuff works great under 4.2.
-- g
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-09 22:21 Problem with Large Shared Libs? Greg Lindahl
@ 1998-09-10 7:36 ` Jochen Kuepper
1998-09-10 13:56 ` Bret Orsburn
0 siblings, 1 reply; 14+ messages in thread
From: Jochen Kuepper @ 1998-09-10 7:36 UTC (permalink / raw)
To: axp-list, Greg Lindahl
On Thu, 10 Sep 1998 Greg Lindahl wrote:
>> Is there a known problem with large shared C++ libraries under Alpha Linux?
>> (Redhat 5.0 and 5.1, egcs 1.0.2 and 1.1b, /lib/ld-2.0.7.so)
>
>Um, if you could get large C++ programs to work at all under Alpha
What do you mean by large ?
>Linux, you'd be ahead of me. At the least binutils has all kinds of
>arbitrary limits, which are driving me crazy. But all that is before
>runtime. I'm not sure if my current problems are due to the hacks to
>get around the binutils problems, or a real g++ bug.
Greetings,
Jochen
-----------------------------------------------------------------------
Jochen K"upper
Heinrich-Heine-Universit"at D"usseldorf jochen@uni-duesseldorf.de
Institut f"ur Physikalische Chemie I
Universit"atsstr. 1, Geb 26.43 Raum 02.29 phone ++49-211-8113681
40225 D"usseldorf fax ++49-211-8115195
Germany http://www-public.rz.uni-duesseldorf.de/~jochen
-----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-10 7:36 ` Jochen Kuepper
@ 1998-09-10 13:56 ` Bret Orsburn
0 siblings, 0 replies; 14+ messages in thread
From: Bret Orsburn @ 1998-09-10 13:56 UTC (permalink / raw)
To: axp-list
Jochen Kuepper wrote:
> Greg Lindahl wrote:
>> Bret Orsburn wrote:
> >> Is there a known problem with large shared C++ libraries under Alpha Linux?
> >> (Redhat 5.0 and 5.1, egcs 1.0.2 and 1.1b, /lib/ld-2.0.7.so)
> >
> >Um, if you could get large C++ programs to work at all under Alpha
>
> What do you mean by large ?
I can't speak for Greg, but here is the largest of the libs we're currently
dealing with:
-rwxr-xr-x 1 borsburn games 10023308 Sep 9 13:50 libOB.so*
% objdump -h libOB.so
libOB.so: file format elf64-alpha
Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00021178 0000000000000120 0000000000000120 00000120 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 000332a0 0000000000021298 0000000000021298 00021298 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 0005fb16 0000000000054538 0000000000054538 00054538 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .rela.data 00000018 00000000000b4050 00000000000b4050 000b4050 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .rela.sdata 00000048 00000000000b4068 00000000000b4068 000b4068 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rela.rodata 0000ff90 00000000000b40b0 00000000000b40b0 000b40b0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rela.got 000296a0 00000000000c4040 00000000000c4040 000c4040 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .rela.ctors 00000090 00000000000ed6e0 00000000000ed6e0 000ed6e0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rela.dtors 00000060 00000000000ed770 00000000000ed770 000ed770 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rela.plt 00006a68 00000000000ed7d0 00000000000ed7d0 000ed7d0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 0000004c 00000000000f4238 00000000000f4238 000f4238 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .text 002016e0 00000000000f42a0 00000000000f42a0 000f42a0 2**5
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .fini 00000034 00000000002f5980 00000000002f5980 002f5980 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .rodata 000453d7 00000000002f59b8 00000000002f59b8 002f59b8 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
14 .data 00000940 000000000043ad90 000000000043ad90 0033ad90 2**3
CONTENTS, ALLOC, LOAD, DATA
15 .ctors 00000040 000000000043b6d0 000000000043b6d0 0033b6d0 2**3
CONTENTS, ALLOC, LOAD, DATA
16 .dtors 00000030 000000000043b710 000000000043b710 0033b710 2**3
CONTENTS, ALLOC, LOAD, DATA
17 .plt 00003554 000000000043b740 000000000043b740 0033b740 2**3
CONTENTS, ALLOC, LOAD, CODE
18 .got 00010230 000000000043ec98 000000000043ec98 0033ec98 2**3
CONTENTS, ALLOC, LOAD, DATA
19 .dynamic 00000130 000000000044eec8 000000000044eec8 0034eec8 2**3
CONTENTS, ALLOC, LOAD, DATA
20 .sdata 00000128 000000000044eff8 000000000044eff8 0034eff8 2**3
CONTENTS, ALLOC, LOAD, DATA
21 .sbss 00000180 000000000044f120 000000000044f120 0034f120 2**3
ALLOC
22 .bss 000013a0 000000000044f2a0 000000000044f2a0 0034f120 2**3
ALLOC
23 .comment 00000a5a 0000000000000000 0000000000000000 0034f120 2**0
CONTENTS, READONLY
24 .mdebug 005a7990 0000000000000a60 0000000000000a60 0034fb80 2**3
CONTENTS, READONLY, DEBUGGING
25 .note 00000028 000000000097e028 000000000097e028 008f7510 2**0
CONTENTS, READONLY
----
Bret Orsburn
borsburn@codonics.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
@ 1998-09-10 14:18 Greg Lindahl
1998-09-10 17:27 ` Bret Orsburn
0 siblings, 1 reply; 14+ messages in thread
From: Greg Lindahl @ 1998-09-10 14:18 UTC (permalink / raw)
To: axp-list
> I can't speak for Greg, but here is the largest of the libs we're currently
> dealing with:
And in mine:
> 18 .got 00010230 000000000043ec98 000000000043ec98 0033ec98 2**3
My .got exceeds the maximum allowed size, because my usual compilation
technique for my big C++ library is to cat all the files together and
let it rip -- the savings on debugging symbols and compilation time is
immense. But the resulting .o has too many symbols for the modern
binutils (".got exceeds 64K blah blah...").
So now I'm trying to figure out if separate compilation breaks because
my code is broken, or egcs is broken.
The total size of my project is 300k lines. egcs couldn't compile it
due to egcs bugs until 1.0.2, but I have hopes that they're testing
well enough that future versions will stay unbroken.
Life is just different with big C++ programs.
-- g
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-10 14:18 Greg Lindahl
@ 1998-09-10 17:27 ` Bret Orsburn
1998-09-11 7:03 ` Jochen Kuepper
0 siblings, 1 reply; 14+ messages in thread
From: Bret Orsburn @ 1998-09-10 17:27 UTC (permalink / raw)
To: axp-list
Greg Lindahl wrote:
>
> > I can't speak for Greg, but here is the largest of the libs we're currently
> > dealing with:
>
> And in mine:
>
> > 18 .got 00010230 000000000043ec98 000000000043ec98 0033ec98 2**3
>
> My .got exceeds the maximum allowed size, because my usual compilation
> technique for my big C++ library is to cat all the files together and
> let it rip -- the savings on debugging symbols and compilation time is
> immense. But the resulting .o has too many symbols for the modern
> binutils (".got exceeds 64K blah blah...").
So, there is a size limit: A 64K limit on the .got section. What utility is
telling you that? I just get a seg fault at run time.
From what I've been able to make out, our program is trying to jump to an
address that has not been adjusted to reflect the load address of the target.
----
Bret Orsburn
borsburn@codonics.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
@ 1998-09-10 17:45 Greg Lindahl
1998-09-11 14:50 ` Bret Orsburn
0 siblings, 1 reply; 14+ messages in thread
From: Greg Lindahl @ 1998-09-10 17:45 UTC (permalink / raw)
To: axp-list
> So, there is a size limit: A 64K limit on the .got section. What utility is
> telling you that? I just get a seg fault at run time.
ld complains about the .got limitation. From looking at the bfd
source, it looks like this is a hard limit.
> From what I've been able to make out, our program is trying to jump to an
> address that has not been adjusted to reflect the load address of the target.
That would be something I've never seen. Well, actually, it could be
what I currently have; gdb isn't being very helpful, and I have to
strip before linking because some of the stabs are longer than 4K,
another limit in the file formats.
As for your program, you're sure the same program works on another
platform? It pays to work to make sure the tools are guilty and not
your code.
-- g
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-10 17:27 ` Bret Orsburn
@ 1998-09-11 7:03 ` Jochen Kuepper
0 siblings, 0 replies; 14+ messages in thread
From: Jochen Kuepper @ 1998-09-11 7:03 UTC (permalink / raw)
To: axp-list, Bret Orsburn
On Thu, 10 Sep 1998 Bret Orsburn wrote:
>Greg Lindahl wrote:
>> My .got exceeds the maximum allowed size, because my usual compilation
>> technique for my big C++ library is to cat all the files together and
>> let it rip -- the savings on debugging symbols and compilation time is
>> immense. But the resulting .o has too many symbols for the modern
>> binutils (".got exceeds 64K blah blah...").
>
>So, there is a size limit: A 64K limit on the .got section. What utility is
>telling you that? I just get a seg fault at run time.
>
>>From what I've been able to make out, our program is trying to jump to an
>address that has not been adjusted to reflect the load address of the target.
That's actually very similar to what I am seeing for Qt-1.40, I guess.
Greetings,
Jochen
-----------------------------------------------------------------------
Jochen K"upper
Heinrich-Heine-Universit"at D"usseldorf jochen@uni-duesseldorf.de
Institut f"ur Physikalische Chemie I
Universit"atsstr. 1, Geb 26.43 Raum 02.29 phone ++49-211-8113681
40225 D"usseldorf fax ++49-211-8115195
Germany http://www-public.rz.uni-duesseldorf.de/~jochen
-----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-10 17:45 Greg Lindahl
@ 1998-09-11 14:50 ` Bret Orsburn
0 siblings, 0 replies; 14+ messages in thread
From: Bret Orsburn @ 1998-09-11 14:50 UTC (permalink / raw)
To: axp-list
Greg Lindahl wrote:
> Bret Orsburn wrote:
> > So, there is a size limit: A 64K limit on the .got section. What utility is
> > telling you that? I just get a seg fault at run time.
>
> ld complains about the .got limitation. From looking at the bfd
> source, it looks like this is a hard limit.
>
> > From what I've been able to make out, our program is trying to jump to an
> > address that has not been adjusted to reflect the load address of the target.
>
> That would be something I've never seen. Well, actually, it could be
> what I currently have; gdb isn't being very helpful, and I have to
> strip before linking because some of the stabs are longer than 4K,
> another limit in the file formats.
>
> As for your program, you're sure the same program works on another
> platform? It pays to work to make sure the tools are guilty and not
> your code.
The program works on the Alpha when statically linked. The libs were developed
on another platform.
I wish I could find an authoritative statement of this .got limitation. The
statically linked version of our prog has a .got section that is considerably
larger than 64K, but seems to work fine. I can speculate on how that could be,
but the uncertainty leaves the issue unresolved.
What is the bfd you refer to above? The search engine at the LDP hasn't heard of
it.
The best doco I've found so far is the ELF spec (but not the Alpha version) and
a DEC OSF/1 Version 2 "Calling Standard for AXP Systems" spec.
----
Bret Orsburn
borsburn@codonics.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
@ 1998-09-11 16:24 Greg Lindahl
1998-09-11 18:02 ` Richard Henderson
0 siblings, 1 reply; 14+ messages in thread
From: Greg Lindahl @ 1998-09-11 16:24 UTC (permalink / raw)
To: axp-list
> I wish I could find an authoritative statement of this .got limitation. The
> statically linked version of our prog has a .got section that is considerably
> larger than 64K,
The limitation seems to be in .o's, not in executables. There is an
offset with a limited number of bits.
> What is the bfd you refer to above?
If you download binutils, there is a Binary File Description (bfd)
library inside it.
-- g
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-11 16:24 Greg Lindahl
@ 1998-09-11 18:02 ` Richard Henderson
1998-09-11 18:44 ` Bret Orsburn
0 siblings, 1 reply; 14+ messages in thread
From: Richard Henderson @ 1998-09-11 18:02 UTC (permalink / raw)
To: axp-list
On Fri, Sep 11, 1998 at 12:24:29PM -0400, Greg Lindahl wrote:
> > I wish I could find an authoritative statement of this .got limitation.
>
> The limitation seems to be in .o's, not in executables.
Exactly so. Any one object file is compiled assuming a single
.got, which is hardware-limited to 64k. At link time, different
object files can be given different .got subsegments, but if
you ld -r them together, we loose information about where the
boundaries between object files had been.
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-11 18:02 ` Richard Henderson
@ 1998-09-11 18:44 ` Bret Orsburn
1998-09-11 19:04 ` Richard Henderson
0 siblings, 1 reply; 14+ messages in thread
From: Bret Orsburn @ 1998-09-11 18:44 UTC (permalink / raw)
To: axp-list; +Cc: Richard Henderson
Richard Henderson wrote:
>
> Greg Lindahl wrote:
>
> > Bret Orsburn wrote:
> >
> > > I wish I could find an authoritative statement of this .got limitation.
> >
> > The limitation seems to be in .o's, not in executables.
>
> Exactly so. Any one object file is compiled assuming a single
> .got, which is hardware-limited to 64k. At link time, different
> object files can be given different .got subsegments, but if
> you ld -r them together, we loose information about where the
> boundaries between object files had been.
So, if you could connect the final dots for me:
This means that the .got segment of a shared library (.so) must not exceed 64KB?
Before I start pressing a vendor to partition their library, I want to be sure
that I have the story straight!
Thanks.
----
Bret Orsburn
borsburn@codonics.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-11 18:44 ` Bret Orsburn
@ 1998-09-11 19:04 ` Richard Henderson
1998-09-11 19:32 ` Bret Orsburn
0 siblings, 1 reply; 14+ messages in thread
From: Richard Henderson @ 1998-09-11 19:04 UTC (permalink / raw)
To: Bret Orsburn, axp-list; +Cc: Richard Henderson
On Fri, Sep 11, 1998 at 02:44:49PM -0400, Bret Orsburn wrote:
> This means that the .got segment of a shared library (.so) must not
> exceed 64KB?
No. It means that none of the .o files that were fed to ld to create
the .so must have (generate) a .got segment that exceeds 64k.
You will get link-time errors if this happens. It will not be silent.
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Problem with Large Shared Libs?
1998-09-11 19:04 ` Richard Henderson
@ 1998-09-11 19:32 ` Bret Orsburn
0 siblings, 0 replies; 14+ messages in thread
From: Bret Orsburn @ 1998-09-11 19:32 UTC (permalink / raw)
To: axp-list; +Cc: Richard Henderson
Richard Henderson wrote:
>
> On Fri, Sep 11, 1998 at 02:44:49PM -0400, Bret Orsburn wrote:
> > This means that the .got segment of a shared library (.so) must not
> > exceed 64KB?
>
> No. It means that none of the .o files that were fed to ld to create
> the .so must have (generate) a .got segment that exceeds 64k.
>
> You will get link-time errors if this happens. It will not be silent.
I get no link-time errors. Just a segment fault at run time.
If I break the shared library into two pieces, it works fine.
(I would do just that if it was our library, but it's a 3rd party lib and I need
something a little stronger than one anecdote before I ask them to repackage
their product.)
----
Bret Orsburn
borsburn@codonics.com
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~1998-09-11 19:32 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-09 22:21 Problem with Large Shared Libs? Greg Lindahl
1998-09-10 7:36 ` Jochen Kuepper
1998-09-10 13:56 ` Bret Orsburn
-- strict thread matches above, loose matches on Subject: below --
1998-09-11 16:24 Greg Lindahl
1998-09-11 18:02 ` Richard Henderson
1998-09-11 18:44 ` Bret Orsburn
1998-09-11 19:04 ` Richard Henderson
1998-09-11 19:32 ` Bret Orsburn
1998-09-10 17:45 Greg Lindahl
1998-09-11 14:50 ` Bret Orsburn
1998-09-10 14:18 Greg Lindahl
1998-09-10 17:27 ` Bret Orsburn
1998-09-11 7:03 ` Jochen Kuepper
1998-09-09 20:30 Bret Orsburn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox