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: [patch] PR ld/11817 Revert part of compressed debug patch to fix ld breakage


On Wed, Jul 14, 2010 at 3:19 PM, Cary Coutant <ccoutant@google.com> wrote:
>>> OK. For the record, the bug has been there since the original
>>> compressed-debug section patch two years ago, but was it impossible to
>>> hit until I added the option to gas.
>>
>> I am adding testcases for compressed-debug sections.
>
> I saw that, thanks!
>
> I've committed the revert.
>
>> I think we should also support compress/uncompress debug sections
>> with objcopy.
>>
>> I think we can do
>>
>> 1. Uncompress debug section on read as an option.
>> 2. Add a BFD function to compress debug sections.
>> 3. Add lang_compress_sections and call it from
>> lang_process.
>>
>> We may be able to share compress functions between
>> gas, ld and objcopy.
>
> My original proposed patch added a compression function to
> bfd/compress.c, but that ended up not being useful for gas, since the
> compressor needed to be frag-aware. When we need it, I can add that
> again, and we might be able to share it between ld and objcopy, but I
> don't think gas could use it without sacrificing some efficiency.
>
> I was thinking of doing the decompression at a lower level in bfd, so
> that both bfd_get_section_contents and
> bfd_simple_get_relocated_section_contents would just do the right
> thing automatically, but that seemed more intrusive, and I wasn't sure

That sounds good.

> that we would always want to decompress the contents.
>

That is true for objcopy without compress/uncompress. We
could set a bit in bfd after opening a bfd and bfd_get_section_contents
could check it to see if it should uncompress the section.


-- 
H.J.


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