I am currently working on updating the build system for a large pile of code that includes a Linux C ++ project. It would be nice if all the developers could run the build upon hacking with their own ideas, so I studied whether it can be built on dimly modern Linux systems, despite the fact that the target system is 2.6.18.
“Vaguely modern” I rate something like GCC 4.5+, something that could happen in the last year or two. I am currently solving the libstdC ++ problem by compiling it statically, and any glibc problems are neatly handled by reassigning memcpy characters (etc.) to old versions using fast shell code. So far so good.
One problem that I cannot fully understand is that some of the characters embedded in the executable from the .o files are of type "u", which is a unique GNU object, an extension to the ELF standard, which 2.6.18 seems to not recognized at all. This means that the executable file will not be launched because it cannot find characters, although they are actually present (only of type “?” On the target, from “nm”).
When compiling g ++, you can disable the use of unique GNU objects, but this is not a very convenient solution. I don’t see any way to disable it when compiling the code (the gcc / g ++ distribution always has this option), and I assume that the only way to get the target system to recognize it is to update ld-linux and the kernel.This will almost certainly not happen.
Is there an option that I have not found to disable these character types? Or maybe there is some neat way around this or something that I am missing? I'm starting to suspect that it just needs to be compiled on g ++ 4.1.x, which would mean an old Linux installation or creation from the source.
source
share