tech-kern archive

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

Re: link-sets in modules



On Tue, May 29, 2012 at 10:26:36AM -0700, Matt Thomas wrote:
> 
> On May 29, 2012, at 10:00 AM, Paul Goyette wrote:
> 
> > On Tue, 29 May 2012, Matt Thomas wrote:
> > 
> >>> Modules that are loaded by the run-time linker _do_ have the above
> >>> info, but do not have the symbols.
> >> 
> >> It could if the kernel loader did what ld did.  create
> >> __{start,stop}_xxxx for each section.
> > 
> > 
> > Yeah, that would be nice.  But the module linker script doesn't do the 
> > PROVIDE()
> > 
> > I suppose the kernel loader could fabricate an extra elf symbol table for 
> > all __link_set_* program sections...
> 
> This isn't in the script, it's internal to ld.

I'm not at all sure ld uses a linker script for 'ld -r' - so you can't
add symbols that way.
No reason why the module loader can't generate them though.

But really you need the module loader be able to request the contents
of the linkset be processed by code in the main kernel (eg to get
sysctls or event counters added).

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index