This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Add --compress-debug-sections option to gas
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 13 Jul 2010 18:02:18 -0700
- Subject: Re: [patch] Add --compress-debug-sections option to gas
- References: <AANLkTim2Li4CdH8itmx1q-8oxxuH0EOcFjzaSsQzmKzX@mail.gmail.com> <20100629080745.GB6954@bubble.grove.modra.org> <AANLkTimTWfQYiyuwTbFQUK1d8wlUe_n-kdoouiTBpRS7@mail.gmail.com>
On Thu, Jul 1, 2010 at 6:03 PM, Cary Coutant <ccoutant@google.com> wrote:
>> SEC_IN_MEMORY isn't sufficient. ?Other sections will be SEC_IN_MEMORY
>> too, eg. SHT_GROUP sections. ?I think your alternate approach of
>> twiddling the frag list is indicated.
>
> Here's an updated patch that builds a new frag list. Since a frag
> requires the data to follow the struct immediately, it didn't work
> with the nice clean interface I added to bfd. It did lead to a more
> efficient way of compressing, however: I now just stream each frag
> through the compression engine, building new compressed frags as the
> compressed data comes out, using the same obstack. At the end, I
> replace the old frag list with the new one. I had to move the
> zlib-specific code into a separate source file, because I can't
> include as.h and zlib.h in the same file.
>
> -cary
>
>
> bfd/ChangeLog:
>
> ? ? ? ?* compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
> ? ? ? ?* dwarf2.c (read_and_uncompress_section): New function.
> ? ? ? ?(read_section): Call it.
> ? ? ? ?(find_line): Likewise.
>
This change caused:
http://www.sourceware.org/bugzilla/show_bug.cgi?id=11817
--
H.J.