I can see a rodata.str1.4 section in one of the
programs compiled with gcc for my Atmel AT91M40800
(ARM7TDMI core) board. It's NOT a c++ project and it
doesn't explictly declare any constans; rodata.str1.4
contains all the strings in the source. I have no idea
why it's called like that, but the conclusion is
clear: .rodata is not the only section that can hold
readonly data, so that syntax is not redundant; on the
contrary, it's a very good thing to use it (unless you
don't want to start wondering where your strings are,
which is what I did the first time I compiled my
program and used only *(.rodata) in my linker command
file).
Bogdan
--- "Lewin A.R.W. Edwards" <larwe@...> wrote:
> >> *(.rodata)
> >> *(.rodata*)
> >
> >
> > Not all the readonly data ends up in .rodata.
> Some of it ends up in other
> > sections (the * is just a wildcard match). This
> is an area of the compiler
>
> Don't quote me on this, but I _believe_ C++ code may
> generate stuff in
> segments named .rodata-something. I vigorously avoid
> C++ in embedded
> projects, so I don't see it a lot.
>
> Note, the syntax above is _not_ redundant. It places
> ".rodata" without
> suffix first in the image, followed by any
> ".rodatasomething" data.
>
> --
> -- Lewin A.R.W. Edwards (http://www.zws.com/)
> Learn how to develop high-end embedded systems on a
> tight budget!
>
http://www.amazon.com/exec/obidos/ASIN/0750676094/zws-20
>
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/Message
Re: [lpc2100] More ld script questions..
2004-01-22 by Bogdan Marinescu
Attachments
- No local attachments were found for this message.