[lkml]   [2003]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: common RODATA in (2.5.59)
Hi Kai,

Kai Germaschewski wrote:
> 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.

>>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 to allow it to link
for both flash+ram or ram-only operation - depending on a CONFIG_


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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.055 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site