In our ELF files generated via GCC linker the top of the ELF file is always the version identifier of the executable code.
This is achieved by creating version.c file and making the resulting object file the 1st linkable object in the link command.
However for one executable this has failed to work and the only difference we can find is that the executable contains a mixture of C and C++ code, and the version symbol is being relocated somewhere else.
The question is therefore is there a way of guaranteeing the absolute location of a symbol in a ELF file such that a symbol is always located at the top of the file either through linker commands or code attribute directives?