Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 1998 12:26:03 +0200
From:      Martin Cracauer <cracauer@cons.org>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Standardizing a BSD/ELF ABI...
Message-ID:  <19980903122603.A24806@cons.org>
In-Reply-To: <199809030221.TAA06719@usr07.primenet.com>; from Terry Lambert on Thu, Sep 03, 1998 at 02:21:38AM %2B0000
References:  <19980903013509.A12206@cons.org> <199809030221.TAA06719@usr07.primenet.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
In <199809030221.TAA06719@usr07.primenet.com>, Terry Lambert wrote: 
> > > It is easy to implement a data-content dependent example of a
> > > library that fails the LGPL relink clause because of this.
> > > 
> > > Techinically, one need only increase the size of a statically
> > > initialized data area.
> > 
> > Are you sure about this? The appended tarfile contains two
> > implementations of a shared library, one with more statically
> > initialized data and some variables in different order, besides
> > different initial values for all variables.
> 
> I meant "non-statically"; sorry.
> 
> Please see sited references from DejaNews...
> 
> 
> char	x[ 4];
> char	foo[ 4];	/* 4 vs. 16 */
> char	y[ 4];
> 
> initme()
> {
> 	x[ 0] = '0';
> 	y[ 3] = '3';
> 	y[ 0] = '0';
> 	y[ 3] = '3';
> 	strncpy( foo, "XXXXXXXXXXXXXXXX", sizeof(foo)-1);
> 	foo[ sizeof(foo)-1] = 0;
> }

[...]

> You need to create cases that are not resolved at runtime (like sizeof(),
> above).

This still works right on FreeBSD-stable and Linux (Debian-1.3). The
sizeof() gives the correct answer for the size of the foo array that
is compiled into the library, even if the library is run with a binary
that was linked against a library with a different size for foo. Test
case appended, see the 'make run' target.

I didn't see anyone posting a piece of code to show the problem, maybe
I overlooked something?

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer
  Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536
  Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany

[-- Attachment #2 --]
m5Zmo6WW
ME^n6؀a[12su$CfC(JiY u<QCl.ƹuOk'@wcҋ:>=ő(8(<OM][_3mI/f04-ڶCgsNh8+}ϳКSP>
Ct|H'αK}̷ٍU𼰪g+HLsxZ:..`S1R
5_g
BזEH$øjjrgmnnH
7ϻt;zo8
fDvoDiǫc|5S;O|.4=+OǟE7.D__]M4OeiFAp+OFg4<%uSһe|emsCWh<0H˗-=Ve=6fOt2IѼ5UbXj%GIHzeyc]-):GfZ]w-DE
-UffKRJErb!A.I{G>0CPjsS]ϳҵ̣X;"	ob"[BV~%P>,2i%!?֧ggff6F;X,Yyl0L3qv63OJ咆l5FU[/Y|KVjc+?Lpno(oRd$*9hm`RRl\NU=G
q|/9v(sV_l/B:Q[^@U<HCa(-JG:кP]$>rʠw\pn.UaLzO7ݷJܖH5=Q}͊Yy)i{f?+%5G]:VI;-'96 O.T
<j
6e@ېC#YLJ@Z1GX@K҂[52S쇾QD+C?&w*NH"؆[&˜OFOYaIHc멞n{5@NkGUmik_!@ @ @ Os[|P
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980903122603.A24806>