This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: User defined sections


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]