[lkml]   [1996]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe:Possible kernel optimizati

>> | heh :) when i first read the ELF standard i came up with the very same
>> | idea ... then i was told that this idea is almost as old as Linux
>> | and that it comes up regularly on linux-kernel, but nobody has done
it so
>> | far.
>> I would venture to guess that it is older than Linux. I first ran
across it in
>> 1975-1979 when I went to college and hacked on CDC 6[46]00 systems,
where it
>> was common to put the init code in the area you would use as buffers.
>> imagine that it is much older than that.
> The SPARC port already implements the ability to throw init code and
> data out the door into the bit bucket after system setup. It should be
> in the mainline kernel whenever Linus syncs the main tree to the SPARC
> port's tree.
> Every piece of init code and data is tagged with the magical "section"
> gcc attribute. Init code ends up in ELF section "text.init" and init
> data ends up in "data.init". It is similar to the magical section
> tricks done with the new exception handling mechanism.
> During the link stage, we arrange for the text.init and data.init
> sections to be last in the executable. After system setup, the init
> code/data gets reassigned as free pages. Viola!

Good! How can do it with a gcc ? In a C code we need to declare this
functions as part of this section (with #pragma ?), in new exception
handling we can do it with __asm__(".section __ex_table,\"ax\"").

Roberto Fichera - email

Xmeo ver.3.0 Alpha for Linux & Windows

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