From: Daniel Jacobowitz <drow@false.org>
To: "Udo A. Steinberg" <us15@os.inf.tu-dresden.de>
Cc: binutils@sourceware.org
Subject: Re: Omit output section from executable
Date: Wed, 02 Aug 2006 20:50:00 -0000 [thread overview]
Message-ID: <20060802205019.GA30722@nevyn.them.org> (raw)
In-Reply-To: <20060802224324.4538786f@laptop.hypervisor.org>
On Wed, Aug 02, 2006 at 10:43:24PM +0200, Udo A. Steinberg wrote:
>
> Hi all,
>
> For an OS kernel I have put all CPU-local data in a specific ELF section named
> ".cpulocal". During bootstrap the kernel allocates a memory page for each CPU
> and maps it to the VMA of the ".cpulocal" section.
>
> I would like the linker to omit the (useless) contents of that section from the
> executable while still maintaining references into the section. I can achieve
> the desired effect by doing an objcopy -R .cpulocal after the final link.
>
> Any way I could do the same with only a linker script and without the objcopy?
I'm not sure exactly what you want, but if the data is useless, try
making the .cpulocal section "nobits".
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-08-02 20:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 20:43 Udo A. Steinberg
2006-08-02 20:50 ` Daniel Jacobowitz [this message]
2006-08-02 21:20 ` Udo A. Steinberg
2006-08-02 21:29 ` Daniel Jacobowitz
2006-08-03 0:44 ` Alan Modra
2006-08-03 1:02 ` Udo A. Steinberg
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=20060802205019.GA30722@nevyn.them.org \
--to=drow@false.org \
--cc=binutils@sourceware.org \
--cc=us15@os.inf.tu-dresden.de \
/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).