I’ve just found something strange in a code written by company which I work for. In an embedded software where dynamic linking doesn’t exists, shared library (released on a GPL licence) is copied into an object which is statically linked then. Here is a piece of a makefile:
$(TARGET_DIR)/$(PHOST)_P_LIBxxxxxx.o: $(TARGET_DIR)/$(BINIMAGE)
$(ECHO) --- Storing dynamically linked library as ELF object ---
$(QUIET)cd $(TARGET_DIR) &&
powerpc-eabi-objcopy --input-target binary --output-target
elf32-powerpc --binary-architecture powerpc:common
--keep-global-symbol=_binary_$(PHOST)_P_LIB_xxxxxx_start
--keep-global-symbol=_binary_$(PHOST)_P_LIB_xxxxxx_end
--keep-global-symbol=_binary_$(PHOST)_P_LIB_xxxxxx_size
--rename-section .data=.rodata,alloc,load,readonly,data,contents
$(BINIMAGE) $(PHOST)_P_LIBxxxxxx.o
$(RM) $(TARGET_DIR)/$(BINIMAGE)
$(ECHO)
$(ECHO) --- P library ready ---
Does it somehow bypass GPL rules? Or simply it’s illegal?
3
The first question, as @Steven Burnap asks, is whether the code in question is under the GPL or LGPL. If it’s under the GPL and you’re linking it with your code in any way and you’re not providing the source to your code, you’re in violation.
If the code is under the LGPL, then you need to provide a way for a user to modify the LGPL portion. This is usually done using dynamic linking, but it doesn’t have to be. Providing the object files of your application along with the source of the library is also permitted (so that the user could re-link your application against a modified library if desired). This lets you avoid distributing your source code, although the object files have quite a bit of detail (symbol names, etc.) about how the source words. You can provide a written offer to make the object files available, as long as you’re willing and able to fulfill it if someone asks; odds are no one will ask.
In other words, what you’re doing is legal only if you make your .o files available or offer to make them available upon request.
For more details, see section 6 of the LGPL 2.1 or section 4d of the LGPL 3.