User defined sections

Nick Clifton nickc@cambridge.redhat.com
Wed Oct 10 10:49:00 GMT 2001


Hi Daniel,

  [Apologies for corrupting your name - my spelling checked barfed on
   the accent!]

> I'm trying to create a program with a custum section. This doesn't
> seem to work; ld.so crashes on it.

First of all, this kind of problem should be reported to the binutils
mailing list, since it is a linker problem.  I have redirected follow
ups to there.

Secondly - how does ld.so crash ?

Thirdly - which versions of the tools are you using ?  In particular
which version of ld are you using ?

Fourthly - which target machine and which host OS are you using ?
Did you include any extra switches when you configured and built the
toolchain ?  What is your shoe size ?  No, sorry, ignore that last
question.

> problem: problem.o image.o
>         gcc -Xlinker -T -Xlinker link.res -o problem problem.o image.o

Does the linker produce any error or warning messages ?
If you pass the "-M" option to the linker does the map it generates
show you the sections being laid out as you expected.  How about
running "readelf -a" on the resulting executable ?

Cheers
        Nick



More information about the Binutils mailing list