When a peice of code, lets say, libfoo, is under the GPL, that means the structures in memory that libfoo defines, the method signatures, etc, are all peices of libfoo. They are copyrighted works released under the GPL.
Yeah, so what? BTW, most of these can be reused as trivial works.
Now, lets say you want to write a peice of software to USE libfoo. To write this software, it's required to import some of libfoo's headers. These headers are copyrighted. When you compile your software, even though it links dynamically at runtime, it still retains this copyrighted memory structure information in the final binary image.
Wrong. Structure definitions, function prototypes, and macros are not copyrightable. There is case law on the issue, and it simply makes common sense. They are pieces of information used by the compiler only at compile time when it is generating code or at link time, and do not remain in any significant form in the compiled program. You can be silly about it and define functions in .h files (or more practical example, use templates), but there is a clear distinction between what is interpreted as machine operations to be compiled into executable code, and what constitutes information that is used only by the compiler at compile time.
This is a major peice of contention... and I would say this IS how the GPL works, even though most people ignore it. WHy would I say that? Because of the LGPL, which was designed SPECIFICALLY to address the issue by putting in writing that it was OKAY to use LGPL libraries in a non-LGPLed program.
You can say it until you're blue in the face, but that doesn't mean it's not wishful thinking. The LGPL is intended to cover libraries of executable code that are combined with a specific program to produce a resultant work. There is nothing that involves (or should involve) header files, because they are not a part of the executable.