文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 资格考试/认证 > 其它考试 > 2 Link time dead code remov-
侵权投诉

2 Link time dead code remov-

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

第1页

你可能喜欢

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email