My problem with the LD linker

Marian Kechlibar marian.kechlibar@circletech.net
Mon Feb 20 21:05:00 GMT 2017


So, why I originally asked about "gold" linker... I am experiencing
trouble with linking a huge project and I hoped that "gold" may get
me rid of this problem. But I reckon I might just ask about my original
problem, perhaps someone is going to help me.

The context: I have five projects for Symbian OS:

Killer
Cleaner
Server
Tester
Expert

I can compile and link them either using:

* ARMCC/ARMLINK 2.2
or
* GCC(E) 4.6.3 and Binutils 2.21 or 2.27.

The first option (ARM) produces usable binaries, but the compiler is
really old and does not support things such as framepointer.

The second option (GCC/Binutils) works for the first four projects, but
the link phase (using ld) fails for the fifth project, saying:

========================================================================
arm-none-symbianelf-ld:
\S60\devices\S60_3rd_FP2_SDK_v1.1\epoc32\release\ARMV5\urel\EEXE.LIB(uc_exe_.o)(.text+0x2):
unresolvable R_ARM_THM_CALL relocation against symbol
`_ZN4User9InvariantEv@@euser{000a0000}[100039e5].dll'

arm-none-symbianelf-ld: final link failed: Nonrepresentable section on
output
========================================================================

Now, this is not caused by omission of a library.
The symbol User::Invariant is contained in the system libraries
and is actually used within the project "Cleaner" as well. So the
complaint is strange.

I have a suspicion that the problem is in *size* of the resulting
binary. The "Expert" project is rather big, several times bigger
than the "Cleaner" project. But I do not understand ELF well enough
to remedy the problem.

Is it possible that some section of the resulting ELF file overflows?

Any ideas would be appreciated.



More information about the Binutils mailing list