Here's a relatively easy way to do it: put "proprietary" parts of your code into separate source files, compile them to object code and decompile the object code back to "source". "Nice" decompilation is of course impossible. But we don't want nice - we can just generate code full of
goto
s, primitive machine instructions, and variable "names" which correspond to the variable's address in memory after the program is loaded.I think that it would work, because the license states only "Accompany it with the complete corresponding machine-readable source code..." Such source code is undeniably machine-readable (and even compileable!), and it seems that distributing a "proprietary" program in such form would comply with the license.
Comments?
6 comments:
I am anything BUT a fan of GPL (as a matter of fact I believe they have a hidden chapel somewhere in Redmond where a Holly Mass is celebrated each Sunday for the good health and long life of the GPL). However, I wonder: would the fact that the resulting distribution source is architecture-specific assembler (the only thing a decompiler is capable of producing) in any way go against the GPL license?
hl
It won't work: the GPL (section 3) defines source code as "the preferred form of the work for making modifications to it." Since decompiled code is unsuitable (and certainly not "preferred") for modifications, it doesn't really qualify as source code.
@1: it would be compileable C code. Yes, its code would resemble the original architecture it was compiled for, but it would still be plain C, compileable for other architectures.
@2: Hmm, but if you only *use* GPL'd code and don't modify it? Ie. if you distribute only the proprietary part of your code in obfuscated C form? Besides, how can they *prove* that you've not written your code in obfuscated form in the first place?
Is there a disassembler that would read compiled object modules and produce C? (I'd be surprised...)
But to expand the topic slightly: what is this blogger's opinion on GPL2 vs. GPL3?
hl
@hl: It's not hard to produce C from assembler (you end up with functions full of cryptic variable names, labels and gotos). What's hard is to produce human-readable C. But this isn't the goal (in this case) anyway :)
As for GPL2 vs. GPL3, I am amused by the show. And I find the FSF's attempts to impose themselves as a moral authority particularly repelling. And repulsion increases as the show goes on. FSF seems to be turning into just another big corporation.
My personal license of choice for my projects is BSD or MIT.
Yes, I'm just as turned off by the FSF's arrogance (Linus wasn't much better, mind you. His statement that it's for the developers to decide, and screw the end user is just as arogant). But there is one thing that makes me personally a fan of GPL3:
One of the principles from which a lot in [3] is derived is that Moglen at al. are firmly opposed to something I'm opposed just as vehemently: if someone has sold me a piece of hardware, I own the bloody thing, and I'm free to do with it whatever I please. And that includes burning the gizmo in the fire, sinking it in a lake AND/OR loading the gizmo with a different software. And I agree with FSF that if someone is using GPL licensed software to create a software platform for the gizmo, he can't incorporate the measures that would prevent me from doing this.
hl
Post a Comment