Does gold support deadcode elimination on relocatable files

Ian Lance Taylor iant@google.com
Mon Dec 22 18:28:00 GMT 2008


Neo Jia <neojia@gmail.com> writes:

> On Dec 21, 2008, at 11:51 AM, Ian Lance Taylor <iant@google.com> wrote:
>
>> "Neo Jia" <neojia@gmail.com> writes:
>>
>>>> After the garbage collection patch for executables is committed, it
>>>> would be perfectly reasonable to extend it by providing a mechanism
>>>> for specifying an explicit root set.  At that time it would be
>>>> reasonable to enable garbage collection for relocatable links when a
>>>> root set is specified.  This work would not require any significant
>>>> changes to the existing garbage collection work.
>>>
>>> As most relocatable files are used in SDK, can we just use the SDK
>>> header files to build the root set?
>>
>> In general, yes, probably.  But, of course, my quoted paragraph
>> remains true.  I'll also note that gold will never have the ability to
>> read header files.
>>
>
> So, would it be possible to make gold to take a user defined root set?

Yes, certainly.

Patches welcome.

Ian



More information about the Binutils mailing list