Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

Geert Uytterhoeven
2011-04-13T18:03:35Z

On Thu, Apr 7, 2011 at 06:14, Greg Ungerer <gerg@snapgear.com> wrote:
> On 07/04/11 13:13, Gavin Lambert wrote:
>>
>> Quoth Greg Ungerer:
>>>>
>>>> Doesn't that have XIP consequences?  .text (and presumably .rodata)
>>>> can be stored and executed from ROM, since they can't be changed at
>>>> runtime.  .data has to be in RAM, since it can be.
>>>
>>> Yes, but even in the kernel XIP case the very early startup code
>>> moves the kernels data to RAM. Well before the system call table
>>> will be needed.
>>
>> But presumably if the syscall table was previously in .text, it was not
>> subject to this.  And now it will be.
>>
>> I doubt this would actually break anything (as you've already confirmed),
>> since it's only a tiny RAM usage increase, but unless there's some reason
>> for the syscall table to be read-write it seems a bit odd.
>
> To be read-write yes, odd, but a data table being in the .text
> section is also odd. It really belongs in the .rodata section.
> And then it will be packed with the .text in our linkers script,
> and wouldn't be copied out to RAM.
>
> So Geert, can we move this to the .rodata section?
>
> I just tried changing the .data section to
>
>    .section ".rodata"
>
> It compiled and work on both m68k and m68knommu targets for me.

Thanks, I'll move it .rodata.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds