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>

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

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii

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

--a8Wt8u1KmwUX3Y2C
Content-Type: application/x-tar-gz
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="shlibs.tar.gz"

H4sIALdt7jUAA+1abW/bNhDOV/NXHLwNTYLaEqm3RV6Hbsk2FNiAYQHaAlsxyDIdc3UkQ5K7
ZkP/+yhKtGlZiREgltH5ng+2dTzeUaSe40PB+Wwuxrl1sk+AaweeBycAQAOqvoG51XcFG8D3
Asf1mWMH0os6Pj0Bb6+jqrHMiygDOImzKI6WPLvPT7pNp10MqFvk1fpfvr7e3zPwiPW3bY9J
L2bbAa5/FzDW/7c0LfaSg9q277oPrL9D6/X3goCV/GcBc07A3stoGjjy9f8rfc+z0Jqlt9zS
U1A+DeTQA0N0ApP/fJHmokizuyfOsZP/rtPgv0t9hvzvAtvMtxbZjVXwvLCqZwMrwf8ZBv9/
SIpM8Pzpc+ziv+t4hv6TWoA6LqPI/y5g/RK951Mx5xYdUusNn8A1X8jlkWew0A1CqczoxcXX
lkWs20gkw7jNzQ/lamq3snIMZ21ubkiDDTca3RfPu9h0HLc7eqHtbziy9ogeDelmRHZvROpp
x6tjqHw1//VTsJccO/hPmXwuNP891yv5T5H/3eDyx5+/++n6Ra83mC5EDIOrX19dwuBNNJ/L
T55laUaIvAhB8XCYp+oHK3+UBYGqT0YI0e21ZzSsPCV1U9K7iWXofBZlkm2Dt3ORyEMHDL5X
lmg85zBI4cuXLT2JzlaFZbqRPTbsZk+ixh6qwet0Mkkd0bw1s1X1Yhu9WLMX22ol8ZxHSUh6
g+wWzmXLeWPyoLhdEJItk63xGCnixdo6nkdmWtldd9Qt88lERe0NLfVV92Zm76bPSx7PUrhK
RXIDooBixiGVHxn8Hd1Bli6TSXucR4+CPjCKQ9Ph6FDX/2pz31OOXfrPs5mu/9K11H/Mo1j/
O8EXIonnywmHb/JiItLh7FtCVrZ+Jeb6hIikUOw+/ZCKyRn5lwAsMmmcnvYlkyGEr/I/kv7z
ktanZ2ejzWZmNrNGO/9Y8CxZeZQZ/6xszTCiTDPRccR2HsE2HNoziZVPmUq05ZKG7K5sNUZV
W+qQGS+WWQL2iHz6zEtWzf9qofeUYxf/GaUr/ef6ruI/vv/pBtXjD7GUTHBukG+kKG9SZCSV
jPIqOa7KwGhtYNpS9lLsbFyvHIhOpRlV2w89EUcKg//lcXwvOXad/yhzVvz3mV+e/2yG/O8E
5v4vt7+b+wSAvP1Cng+NOlFbXkD/VTyDsUiAi4RD+RZhkMfpgsPrKBPqGBYt80r590c60Lq6
rOJQXRwkPv4O7rvR6nKapsqgdwzrHFz4kA+B+nBuwS6s4txVYZuFTOmZek837q3c3bdK3Jav
ro6fSKP4NT2FGbZRF7d9jbDNill5yymy38lpe2Y/KyWJvDVHXTr68oFWudZJvLg7LSf2OfTf
NiAVTy7+4en0VLafDajSPGoNNsxlQNuQQ9L6+QuiI4NZ/8eHqf9AvVr/MRYEtvr/RxAEWP+7
QEup39KCWzW+Mt9T4Ju6sa7sh75RRCsM/rND6T8md/GV/vMq/efg+59O8Ej91yLb2IamWybL
nE9GT6MXWf9hSUj9Y5WE66mebnvrNUDpiNgFs/4fTv/Za/1HHVX/baz/neBp9R9r138MX+8h
EAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEArFP/AdzW3wUAFAAAA==

--a8Wt8u1KmwUX3Y2C--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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