Article View: gnu.misc.discuss
Article #72563Re: Too Good to be True?
From: David Chase
Date: Sun, 26 Jan 1992 22:20
Date: Sun, 26 Jan 1992 22:20
43 lines
2176 bytes
2176 bytes
In article <ABRAHAM.92Jan25150051@loke.iesd.auc.dk> abraham@iesd.auc.dk (Per Abrahamsen) writes:
> Given the two
>source files
>
> gnu.c (under GPL)
> mathew.c (written by you)
>
>You can decide how to distribute (or not distribute) `mathew.c', even
>if some function in `mathew.c' do call a function defined in `gnu.c'.
>
>However, if you campile a binary `a.out' from the two source files
>`gnu.c' and `mathew.c', then a.out will clearly be a derivative of
>both files. Thus, if you distribute a.out (a derivative of `gnu.c')
>then you must also be willing to distribute the full source for
>`a.out', i.e. both `gnu.c' and `mathew.c'. Given FSF's goal, that
>seems very reasonable.
Assuming for the moment that this is correct, then the obvious slimy
way around this is to make use of dynamic loading of programs.
Compile the gnu stuff into a shared library, and write some
include files of the form:
#define gnu_foo (*gnu_foo_ptr)
extern type (*gnu_foo_ptr)();
and in some other file:
type (*gnu_foo_ptr)() = & load_gnu_foo;
type load_gnu_foo() {
dynamically loads and opens the desired routines;
gnu_foo_ptr = address of loaded routine;
return gnu_foo();
}
Say "man dlopen" on a Sun to figure out how to do this; I don't know
what the equivalent is on other machines. I'd love to see an official
opinion on this, but I suspect that it is in the FSF's interests to
let people wonder if this trick is permitted by the license or not.
Enjoy.
David
Technical Details
Message-ID:
<ko6d26INNcjn@exodus.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cronkite.Central.Sun.COM!exodus.Eng.Sun.COM!rbbb.Eng.Sun.COM!chasedReferences:
<1992Jan23.224808.28281@news2.cis.umn.edu> <Dma3eB20w164w@mantis.co.uk> <ABRAHAM.92Jan25150051@loke.iesd.auc.dk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,e71af1b1f401c58d X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1992-01-26 14:42:08 PST Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cronkite.Central.Sun.COM!exodus.Eng.Sun.COM!rbbb.Eng.Sun.COM!chased From: chased@rbbb.Eng.Sun.COM (David Chase) Newsgroups: gnu.misc.discuss Subject: Re: Too Good to be True? Message-ID: <ko6d26INNcjn@exodus.Eng.Sun.COM> Date: 26 Jan 92 22:20:54 GMT References: <1992Jan23.224808.28281@news2.cis.umn.edu> <Dma3eB20w164w@mantis.co.uk> <ABRAHAM.92Jan25150051@loke.iesd.auc.dk> Organization: Sun Microsystems, Mt. View, Ca. Lines: 43 NNTP-Posting-Host: rbbb