From: Vincent Rubiolo <vincent.rubiolo@windriver.com>
To: Nick Clifton <nickc@redhat.com>
Cc: Pieter Arnout <pieter@powerescape.com>,
grigory.zagorodnev@intel.com, binutils@sources.redhat.com
Subject: Re: HELP with linker script!!!
Date: Fri, 01 Apr 2005 12:53:00 -0000 [thread overview]
Message-ID: <424D4412.4020700@windriver.com> (raw)
In-Reply-To: <424D2F42.5070508@redhat.com>
Hello Nick,
Thanks for this informative reply. There is something I am wondering
about using the gcc attributes to put variables or functions : how to
control the section flags of these new sections?
I know I can use objcopy with the --set-section-flags to tweak section
flags to my liking. I was wondering how gcc was settings these flags :
for your '.cached_bss' section, it may have the NOBITS flag set but does
gcc know that, for instance, the NOBITS flag will have to be set?
As for Pieter problem, the crt0.c will surely rely on special symbols
like __heap_start or __stack_start (set by the linker script) to detect
and set the start of heap and stack.
You are also encouraged to use the MEMORY keyword that Nick mentioned :
it make things clearer. However, it may not suit you if you have
sections that have dynamic addresses/sizes i.e computed from say, the
previous section' size (you will then have to rely on the computation
capabilities of the ld script).
Regards,
Vincent
Nick Clifton wrote:
[...]
> your application then it is easy. Simply use the:
>
> __attribute__((section(".cached_bss")))
>
> feature of GCC to annotate all of those variables which you want to be
> placed into the cacheable RAM, and then make sure that your linker
> script assigns the .cached_bss to the cacheable RAM memory region. Easy!
> :-)
>
> MEMORY
> {
> cachableRAM : org = 0x100, len = 0x200
> uncacheRAM: org = 0x3000, len = 0x40000
> }
>
> SECTIONS
> {
> [...other sections...]
>
> .cached_bss : { *(.cached_bss) } > cachableRAM;
> .bss : { *(.bss) } > uncacheRAM;
>
> [...other sections...]
> }
>
> Cheers
> Nick
--
Reclaim Your Inbox!
http://internal.vannes.wrsec.fr/twiki/bin/view/Utilities/MailThunderbird
next prev parent reply other threads:[~2005-04-01 12:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-31 14:42 Pieter Arnout
2005-03-31 15:50 ` Nick Clifton
[not found] ` <29c1ff0410ff9cc2b88a3ad82d1938aa@powerescape.com>
2005-04-01 11:27 ` Nick Clifton
2005-04-01 12:53 ` Vincent Rubiolo [this message]
2005-04-01 14:05 ` Nick Clifton
2005-04-01 14:13 ` Dave Korn
2005-04-01 14:34 ` Andreas Schwab
2005-04-01 16:53 ` Pieter Arnout
2005-04-04 9:39 ` Vincent Rubiolo
2005-04-04 11:06 ` Nick Clifton
2005-04-04 11:11 ` Dave Korn
2005-04-04 11:59 ` Sergei Organov
2005-04-04 13:39 ` Nick Clifton
2005-03-31 15:08 Zagorodnev, Grigory
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=424D4412.4020700@windriver.com \
--to=vincent.rubiolo@windriver.com \
--cc=binutils@sources.redhat.com \
--cc=grigory.zagorodnev@intel.com \
--cc=nickc@redhat.com \
--cc=pieter@powerescape.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).