TinyLinuxKernelProject:SectionGarbageCollectionPatchset
WuZhangjin
TinyLab-EmbeddedGeeks
doc.guandang.net
ShengYong
Distributed&EmbeddedSystemLab,SISE,LanzhouUniversity,China
TianshuiSouthRoad222,Lanzhou,P.R.China
shengy07@lzu.edu.cn
Abstract
Linuxiswidelyusedinembeddedsystemswhichalwayshavestoragelimitationandhencerequiressizeoptimization.Inordertoreducethekernelsize,basedonthepreviousworkofthe“SectionGarbageCollectionPatchset”,Thispaperfocusesondetailsitsprinciple,presentssomenewideas,documentstheportingsteps,reportsthetestingresultsonthetop4populararchitectures:ARM,MIPS,PowerPC,X86andatlastproposesfutureworkswhichmayenhanceorderivefromthispatchset.
1Introduction
ThesizeofLinuxkernelsourcecodeincreasesrapidly,whilethememoryandstoragearelimitedinembeddedsystems(e.g.in-vehicledrivingsafetysystems,dataacquisitionequipmentsetc.).Thisre-quiressmalloreventinykerneltolightenoreveneliminatethelimitationandeventuallyexpandthepotentialapplications.
TinyLabestimatedtheconventionaltailoringmethodsandfoundthattheoldTiny-linuxprojectisfarfrombeing nishedandrequiresmoreworkandhencesubmittedaprojectproposaltoCELF:“WorkonTinyLinuxKernel”toimprovethepreviousworkandexploremoreideas.
“Sectiongarbagecollectionpatchset(gc-sections)”isasubprojectofTiny-linux,theinitialworkisfromDenysVlasenko[9].Theexistingpatch-setdidmakethebasicsupportofsectiongarbagecollectionworkonX86platforms,butisstillout-sideofthemainlineforthelimitationoftheoldGNUtoolchainsandfortherearesomeworkstobedone(e.g.compatibilityoftheotherkernelfeatures).
1
Ourgc-sectionssubprojectfocusesonanalyzesitsworkingmechanism,improvesthepatchset(e.g.uniqueuserde nedsections),appliestheideasformorearchitectures,teststhemandexplorespotentialenhancementandderivation.Thefollowingsectionswillpresentthemrespectively.
2
Linktimedeadcoderemov-ingusingsectiongarbagecol-lection
Compilerputsallexecutablecodeproducedbycom-pilingCcodesintosectioncalled.text,r/odataintosectioncalled.rodata,r/wdatainto.data,andunini-tializeddatainto.bss[2,3].Linkerdoesnotknowwhichpartsofsectionsarereferencedandwhichonesarenotreferenced.Asaresult,unused(or‘dead’)functionordatacannotberemoved.Inordertosolvethisissue,eachfunctionordatashouldhasitsownsection.
provides-ffunction-sectionsor
-fdata-sectionsoptiontoputeachfunctionordata
gcc
Main Contents Discrete-Time Signals Important types of signals and their operations Linear and shift-invariant system Easier to analyze and implement The ...
Deep-time evidence of a link between elevated CO2 concentrations and perturbations in the hydrological cycle via drop in plant transpiration Margret ...
Deep-time evidence of a link between elevated CO2 concentrations and perturbations in the hydrological cycle via drop in plant transpiration Margret ...
热门文档