4 ms·
So what's the point of GPL if it's written in assembler?
by kryptiskt 9y ago
So what's the point of GPL if it's written in assembler?
- kryptiskt 9y agoApparently the 64-bit version is under another non-commercial-only license.
- setzer22 9y agoAssembly language can be reasonably structured and have comprehensive comments to name subroutines, for example. There is some value to that vs what you would get by de-assembling a binary. Depending on the GPL, this would also ensure this OS doesn't run on restrictive platforms like iOS.
- colejohnson66 9y agoThat’s not the GPL, that’s just the usage of assembly. As a side note, I remember years ago (around iOS 5 or earlier IIRC), there was a version of Bochs compiled for iOS and available on Cydia. It came with an IMG of an installed Windows 95 box and was very slow, but it was “running”[0] x86 on iOS. [0] Quotes around “running” because Bochs isn’t so much of an emulator as it is an interpreter. It’s still an emulator, but it runs by interpreting each instruction instead of binary translation like “modern” emulators.
- 0x0 9y agoAssembly source code is vastly better for modifications compared to a assembled binary? It's not like it's written in a hex editor?
- colejohnson66 9y agoTo add to this: the reason is that you still have function names (the assembler or linker might remove all but `_start'[0]). If the assembly used any macros, you have those. And the biggest IMO: comments are still there. [0]: Or whatever it’s called on $(OS)
- tyingq 9y agoHere's an example. OpenSSL uses assembly routines to speed up some cryptographic operations. For example, here's some routines for MD5 on x86_64: https://github.com/openssl/openssl/blob/master/crypto/md5/asm/md5-x86_64.pl https://github.com/openssl/openssl/blob/master/crypto/md5/as... Don't let the perl extension fool you. It's mostly ASM, the perl is there to help with the build. It was pretty easy to find someone that had copied it and violated their license by removing the copyright text, and further claiming to release it into the public domain. Perhaps not on purpose, but... https://github.com/GaloisInc/hacrypto/blob/master/src/C/libssl/HEAD/src/crypto/md5/asm/md5-x86_64.pl https://github.com/GaloisInc/hacrypto/blob/master/src/C/libs...
- 482794793792894 9y agoJust because you can view the source code, doesn't mean you're allowed to modify it and then use the modified version for yourself or publish the modified version. GPL ensures that you're allowed these things and that anyone, who does modify it, has to then again allow these things to anyone who uses their version. Yes, a good chunk of GPL – that the source code has to be published along with the software, is pointless here, so a simpler license could have been chosen, but I guess, they went with GPL anyways, as it's a proven license which has already had a few courts look over it.
- mikebenfield 9y agoThe common misconception you seem to be displaying is that the advantage of "open source" software is that it comes with the source code. This is exactly why Richard Stallman objects to the term "open source" and prefers "free software": because the point of the thing is that you are legally free to modify and distribute it. Access to source code is just a prerequisite to be able to practically exercise those freedoms. (I'm making no commentary on whether he's right about this. Personally I tend to say "open source" more often, because that term has basically won out and I'm more likely to be understood.) By the way, years ago when Microsoft was apparently going to war against open source/free software, there was a bit from some Microsoft executive who said something like, "Open source is pointless. If our customers want to see our source code, they can just ask. But nobody does. Nobody cares about source code." He was exploiting people's misconceptions about what "open source" means. Indeed, nobody cares much about source code if they're not allowed to do anything with it. (Plus, disassembling a binary is a massive pain compared to just using the commented and labelled assembly file.)
- ZenoArrow 9y agoAssembler and machine code aren't the same thing. Your computer does not run assembly, it runs machine code. Assembly languages are still "compiled" into machine code, except that this process is called "assembling" and is much simpler than compiling other languages due to the structure of assembly and machine language being so close. Whilst that similarity makes it easier to disassemble (i.e. decompile) back to working assembly, the structure of the code can be lost, especially if code is organised in a modular way (using macros, etc...). As modularity improves maintainability, there is a technical benefit to having code written in assembly protected under the GPL.