Date: Thu, 3 Sep 1998 01:35:09 +0200 From: Martin Cracauer <cracauer@cons.org> To: Terry Lambert <tlambert@primenet.com>, David Dawes <dawes@rf900.physics.usyd.edu.au> Cc: mike@smith.net.au, jb@cimlogic.com.au, freebsd-current@FreeBSD.ORG Subject: Re: Standardizing a BSD/ELF ABI... Message-ID: <19980903013509.A12206@cons.org> In-Reply-To: <199809020757.AAA24402@usr02.primenet.com>; from Terry Lambert on Wed, Sep 02, 1998 at 07:57:18AM %2B0000 References: <19980902131453.C21469@rf900.physics.usyd.edu.au> <199809020757.AAA24402@usr02.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] In <199809020757.AAA24402@usr02.primenet.com>, Terry Lambert wrote: > > Is there compatibility for dynamically linked executables when using the > > runtime host platform's native libraries? > > Yes and no. > > ELF supports the idea of multiple, seperate data segments. > > Using this construct, one can finally build shared libraries where > the data section of a shared libraries static, initialized data > comes from the dynamically linked shared library in the load phase > rather than the link phase. > > If you want to get into details: any program distribured for Linux > at this time FAILS the LGPL relink clause because the data segment > is linked into the program image from the shared library at the > time the program is linked, and runtime relinking applies only to > code, not to data. > > 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. On FreeBSD-2.2.7-stable and Linux (Debian-1.3) this gives correct results. I have not been able to reproduce a case where data from the library I linked against is used instead of data from the .so file that happens to be in place when the program runs. See the 'make run' target. I also tried to push the amount of extra data in test2a.c to more than 32K, but the result was still correct. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer BSD User Group Hamburg, Germany http://www.bsdhh.org/ [-- Attachment #2 --] 25 \Oo6W֮vvځp"bU:xK+00`e"ˆ$~}wYGenR4? (|DK ,;1q8bGcrj4AK7-CV%0OR/Xc,ޤ76.m|Sڸ>0$ m`+=2eq1!_eQ (%(i0:pZHx+(r K,AO'Ϛo:qtcKo dG/5O]X(b%71F*ш<gIpI8s̵pƁO'.@d@PF^G5St4qUo1.*y7/g.^tAQK|48Q;\䧊8@<goo߂5hSo>ewXJxqăV 3@Y!f2~N?eIWܻ82^zd{;w&^D--*ܿm뱗m QUۂLCn(G&'!fhp 4(@cU!/q1|,@KZQk bc 3lpZd1-$0d?{.KJv"qd檵]jEJ-CEH|5Khz*]4[[eмhXԄj!oMk:>^3qQOleP[|( 4M ^zHl2[Y!>_*r5VZ}QjT6Hfͨ%=NuE(,]``viUۀXKϗv1Q$K._ՐKSw1":cg/7O][ZY &9#+|%̬fP5[MWZ?MKo%o=<&熜鼿Z[ג}iW) _[t}OmKh}8_Г})˔WyRk27M;6 MT?iVnz7*e2#ݔ6y4OȽJ bNW"_ݴSb=M}N`T7=BKHHH4T P
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980903013509.A12206>
