[Gllug] Hypothetical GPL question

David Spencer David.W.Spencer at oracle.com
Tue Oct 30 14:28:21 UTC 2001


Hypothetical answer.  Without Prejudice - I think that's what I have to
say.  I'm not a lawyer.  This is not legal advice.



Why do you want to con people into thinking your product is GPL when it
isn't?  You are talking about a well known legal artifact here that is
called "fraud."  Judgement over, now to the answer :-)


Simply define your own licence based upon the GPL but without the bits
you don't like.
Unfortunately you won't then be able to call it "GPL".
iirc, GPL doesn't state that you have to release source, only that you
have to make it available for reasonable costs only (check the small
print for details).

Look for the LGPL - this seems to be a way of doing what you want to. 
You can hide the bulk of the code in the library then release a GPL
source code that is simply:

#include <mylib.h>
main()
{
	justdoit();
}

Clearly you are not an assembler programmer!  There is a vast difference
between a disassembly of a compiled program and an assembler source code
file.  If you can find a compiler that will compile via assembly (gcc
for example) this will give you an idea but there will still be lots of
obviously machine generated label names.  Machine code is the numbers
that make up an executable file, e.g. 4C 01 05 00 E1 9D 5E 32 and is
definitely no kind of source code.  Assembly code is like:

ORG $C000
JSR $MyPrintRoutine
DB 'Hello World',0
RTS

and is nothing like machine code; a processor cannot execute this
directly.  Machine code means machine-executable code.  Compiled C
source is again different; it contains machine code but not in a
directly executable format; the object file must be linked first to
produce an executable.

So to do what you are proposing, you would need to disassemble the
executable (unless you can find an object code disassembler), work out
which labels are which, determine exactly what constitutes "compiler
fingerprints" as you can be sure it's more than "db 'Copyright
Microsponge',0" - the generated code is as much copyright as the
compiler itself.  You would need to be a master assembler programmer to
be able to do this, in which case you would more than likely just write
the whole thing in assembler in the first place.

A program written in assembly can be sold under the GPL.  If your
customers are capable of using assembly language then they can ask for
the source and you will be required to produce it.  Nothing in the GPL
restricts your choice of language - it only restricts your ability to
restrict your customers.  You can write GPL code in C, Java, Assembler,
Fortran, Algol, whatever language the Mark 1 used, whatever.  You can
even define your own language, although if you do this I believe you
have to release the compiler as well, which is why the GPL doesn't fit
easily onto Windows as very few compilers are free and very few people
are willing to give a copy of MSVC to every customer.  By "source" the
GPL means "the ability to rebuild the program".  You'll have to read it
in detail with a lawyer to get the full effect.

> ...what *is* source code...

If you can demonstrate the ability to open a hex editor and write
working machine code, then there is nothing to stop you calling the .EXE
the source code.  But I think you'll have a job proving this (although
the burden of proof is on the prosecutor.  However these days all big
companies have to do to swing the judgement their way is to shout
"Pirate!" and it seems every judge at this point winds up proceedings in
their favour even if there is no piracy involved.  See DeCSS for an
example).  And a hell of a lot of bugs to remove, in any code worth
selling.

Therefore source code is what you write the program in, before running a
compiler or interpreter to convert it into machine-executable format. 
Java is source code.  Java byte code is not source code.  If you know
byte code extremely well, you could theoretically write a program in
byte code directly, this would then be the source.  But again you would
have a problem with credibility unless you were a recognised JBC expert.

> To a non-programmer

To a non-programmer, the GPL is pretty much a waste of space except that
it allows them to install on however many computers they want.  But that
non-programmer may want one day to hire a programmer, e.g. you, to make
changes they want.  They are less likely to hire you if you are a
rip-off merchant.


I don't believe you have to publish your plans, only the final source
itself.  So if your program is of the form:

10 DATA 10,20,30,40,...
20 FOR ...poke this lot into RAM starting at P
30 LET L=USR(P);

then that is the source you must release.  It is up to your customers
then if they want to argue about whether or not this constitutes
source.  Clearly it _is_ source code, but you may lose the case as
anyone from GNU hypothetically hired as a consultant might instantly
zoom in on the "10,20,30,40,..." and declare this non-source.

It also depends how happy you want your customers to be at the end of
the day.

Dave.


Paul Brazier wrote:
> 
> Philosophical question:
> 
> Suppose I write a program directly in machine code, could I then release
> the binary as GPL without having to distribute any "source code". In
> effect the binary being its own source code.
> 
> I remember ages ago I had some sort of Atari computer (6502 processor)
> which just came with a simple BASIC language. Atari magazines were full
> of program listings for you to type in which were just long lists of
> machine code, together with a simple BASIC program to load it into
> memory. I even wrote a small implementation on the "Life" cellular
> automaton using this method and a printed reference of 6502 assembly
> codes from a BBC micro manual.
> 
> This principle being established, could someone then just write a
> program in C, compile it and then claim they wrote it in machine code
> and release it under the GPL without the source code? Perhaps cleaning
> up the code so it wouldn't have any compiler "fingerprints" left.
> I'm not sure why someone would want to do this :-) but it raises the
> question of what *is* source code - does it have to easily
> human-readable? This would be a subjective definition anyway.
> Also, parts of the kernel are written in assembler and I presume are GPL
> so you could write a program in assembler and claim you wrote it in
> machine code.
> 
> To a non-programmer, access to C source code would be just as helpful as
> access to the "machine source code" i.e. the binary.
> Perhaps there are already GPL binaries-only out there?
> 
> --
> Paul Brazier
> Cosmos UK

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list