public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Cc: Miles Bader <miles@gnu.org>, linux-kernel@vger.kernel.org
Subject: Re: common RODATA in vmlinux.lds.h (2.5.59)
Date: Thu, 23 Jan 2003 15:59:43 +1000	[thread overview]
Message-ID: <3E2F84CF.4010609@snapgear.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0301221014250.9969-100000@chaos.physics.uiowa.edu>

Hi Kai,

Kai Germaschewski wrote:
[snip]
> You want to use sections as an abstraction for different parts of the 
> image, like text/rodata vs data. However, let me claim the sections are 
> not the right tool for the job, instead that's why ELF segments exist.
> Just declaring two MEMORY regions, e.g. rom/ram and putting text/rodata
> sections into rom, the rest into ram will give you a vmlinux with two 
> segments, exactly what you need. (There's two ways to do that, using 
> MEMORY or PHDRS - whatever works better for you)

I can see your point here. So as long as we can get the sections
within RODATA placed into the right segment then we can still do
what we need. That will be good enough for me in the m68knommu case.


[snip]
>>It's not that it _needs_ to group things inside a single output section
>>(though often doing so is just simpler), but it _does_ need more control
>>over the output sections than is provided by the current RODATA macro:
>>at least, it needs to be able to specify which memory regions the
>>various sections go, sometimes at separate link- and run-time addresses
>>(i.e., a "> MEM AT> OTHER_MEM" directive following each output section).
> 
> 
> All of this can, AFAICS, be nicely handled by additional 
> "{TEXT,RODATA,DATA}_MEM" macros which allow the arch to specify regions as 
> necessary.

Oddly enough (or perhaps not :-) this is virtually the method I
currently use in the m68knommu vmlinux.lds.S to allow it to link
for both flash+ram or ram-only operation - depending on a CONFIG_
option.

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Wizard        EMAIL:  gerg@snapgear.com
SnapGear Pty Ltd                               PHONE:    +61 7 3435 2888
825 Stanley St,                                  FAX:    +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia              WEB:   www.SnapGear.com


  parent reply	other threads:[~2003-01-23  5:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-22  2:05 common RODATA in vmlinux.lds.h (2.5.59) Greg Ungerer
2003-01-22  2:49 ` Kai Germaschewski
2003-01-22  3:25   ` Greg Ungerer
2003-01-22  4:32     ` Miles Bader
2003-01-22  4:47       ` Greg Ungerer
2003-01-22  5:42       ` Sam Ravnborg
2003-01-22  6:00         ` Miles Bader
2003-01-22  5:55       ` Kai Germaschewski
2003-01-22  6:23         ` Miles Bader
2003-01-22 16:32           ` Kai Germaschewski
2003-01-23  2:03             ` Miles Bader
2003-01-23  5:59             ` Greg Ungerer [this message]
2003-01-22  6:35         ` Greg Ungerer
2003-01-22 16:35           ` Kai Germaschewski

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=3E2F84CF.4010609@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=kai@tp1.ruhr-uni-bochum.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles@gnu.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