tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MI linker script



On Sat, Nov 8, 2014 at 12:16 AM, Nick Hudson <skrll%netbsd.org@localhost> wrote:
> On 11/07/14 14:53, Masao Uebayashi wrote:
>>
>> I want to make kernel linkage use MI linker script, so that MI ELF
>> section/symbol handling is centralized into the one place.  Instead of
>> directly link *.o into "netbsd", link an intermediate relocatable
>> "netbsd.ro".
>
> Why?

Do some link processing in MI.  Alignment
(.data.{read_mostly,cacheline_aligned}) for one, more in the future.
Kernel modules already do this in *.o -> *.kmod.

>> The downside of this is that build uses more disk space.  I mean to
>> compensate that by making kernel build share objects in the long run,
>> but it will take Long Time...
>
> Another downside is that you're going to break quite a few kernels that rely
> on linker scripts.

MD linker script is done in netbsd.ro -> netbsd.  See ${LINKFLAGS}.

I suppose all ports already use linker script.  If some don't, I'll fix.


Home | Main Index | Thread Index | Old Index