From: Ralf Baechle <ralf@linux-mips.org>
To: Teresa Tao <TERESAT@TTI-DM.COM>
Cc: linux-mips@linux-mips.org
Subject: Re: question regarding put data in the specified section
Date: Sat, 15 Nov 2003 13:53:29 +0100 [thread overview]
Message-ID: <20031115125329.GA324@linux-mips.org> (raw)
In-Reply-To: <92F2591F460F684C9C309EB0D33256FA01B750B8@trid-mail1.tridentmicro.com>
On Fri, Nov 14, 2003 at 09:42:34AM -0800, Teresa Tao wrote:
> Does anyone know how to put my userland program's data in a specified section?
>
> I know there is an attribute "section" to put my data inside a specified section, for example, int data __attribute__ ((section("INITDAT"));
> But how do I initialize/setup the INITDAT section? We use the
> commercial toolchain, and we don't have the source code for it, is
> there still a way to specify the postion of the INITDAT section?
If your commercial toolchain understands the __attribute__ syntax then
I suspect it's based on gcc which would mean you have a right to the
sourcecode.
No initialization needed; Ld will use the flags of the first instance
of an input section for the output section which usually is right. In
the rare case this isn't suitable you can use a .section pseudo-op
in inline assembler or assembler to setup the section with the right
flags. Just make sure this section is linked first.
Ralf
next prev parent reply other threads:[~2003-11-15 12:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-14 17:42 question regarding put data in the specified section Teresa Tao
2003-11-14 17:42 ` Teresa Tao
2003-11-15 12:53 ` Ralf Baechle [this message]
2003-11-16 9:00 ` file handling in kernel mode durai
2003-11-16 9:00 ` durai
2003-11-16 22:51 ` Ralf Baechle
2003-11-17 0:46 ` Brad Parker
2003-11-17 1:06 ` Ralf Baechle
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=20031115125329.GA324@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=TERESAT@TTI-DM.COM \
--cc=linux-mips@linux-mips.org \
/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