This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compressed code sections


On Mon, Jul 7, 2008 at 4:51 PM, Nick Clifton <nickc@redhat.com> wrote:

Hi Nick, thanks for your reply,

> Hi Will,
>
>> I'm implementing support for a code compression technology, and my
>> first approach to implementation was to modify ld so that on a final
>> link the code sections would be compressed. This proves to be
>> difficult because bfd does not seem to have support for an on-disk
>> section being smaller than the same section in memory (i.e. we have
>> vma and lma, but just one size per section). Are there any hooks in
>> the linker that might be able to do this?
>
> Not really no.  Sorry.
>
> You might try looking at the sources for the new linker (gold) since that is
> not using the BFD library.
>
> You might also consider creating your own tool to be run after the linker
> which does the section compression.

I have considered the post linking tool, but there are a number of
problems with that approach, things like integrating with existing
toolchains and a few minor technical difficulties (e.g. the linker has
to relax the code in a certain way if it is to compress correctly).

gold looks like it could be promising, it supports compressed sections
as a general concept but unfortunately does not support some other
things yet that I would like, for example none of the gold ports seem
to support any kind of long branch stubs at this point.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]