From owner-freebsd-current Tue Sep 8 08:28:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA16949 for freebsd-current-outgoing; Tue, 8 Sep 1998 08:28:44 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA16926 for ; Tue, 8 Sep 1998 08:28:39 -0700 (PDT) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.8/8.7.3) id RAA12650; Tue, 8 Sep 1998 17:28:08 +0200 (CEST) Message-ID: <19980908172807.A12626@cons.org> Date: Tue, 8 Sep 1998 17:28:07 +0200 From: Martin Cracauer To: Terry Lambert , Martin Cracauer Cc: freebsd-current@FreeBSD.ORG Subject: Re: Standardizing a BSD/ELF ABI... References: <19980903122603.A24806@cons.org> <199809040003.RAA06884@usr09.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i In-Reply-To: <199809040003.RAA06884@usr09.primenet.com>; from Terry Lambert on Fri, Sep 04, 1998 at 12:03:49AM +0000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In <199809040003.RAA06884@usr09.primenet.com>, Terry Lambert wrote: > > I didn't see anyone posting a piece of code to show the problem, maybe > > I overlooked something? > > Your program is: > > main() > { > extern char foo[]; > > initme(); /* get from shared library*/ > /* override default initilization from library*/ > strcpy( foo, "up to 16 bytes"); > } > > Link it against a library with a foo of size 16, and then run it with > a (newer) library with a foo of size 4. [...] That's all? I'm afraid I have to rate that as lame :-) You are using data from a library or provide data to a library that is not specified in the interface. It could have been declared in an interface file with a certain size, in that case, you wouldn't be able to compile the pieces of code that don't fit together. Or you declare a pointer only, in that case you can't make any assumptions about the size, all you can do is to call a function in the same unit the data has been declared in, which knows the real size. So no problem either way as long as you strickly implement and obey to the published interfaces. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message