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] Add --compress-debug-sections option to gas


>> +bfd_boolean
>> +bfd_compress_section_contents (bfd_byte **buffer, bfd_size_type *size)
>> +{
>> +#ifndef HAVE_ZLIB_H
>> + ?/* These are just to quiet gcc. ?*/
>> + ?buffer = 0;
>> + ?size = 0;
>
> Except they don't quiet gcc-4.6. ?Just add ATTRIBUTE_UNUSED to the params.

Good idea, thanks.

>> + ?compressed_buffer[4] = uncompressed_size >> 56;
>
> This is going to warn and thus break the build when bfd_size_type is
> 32-bits, as can happen on a 32-bit host supporting 32-bit targets.

OK, I'll fix it to fill in the buffer from the other direction,
shifting 8 bits at a time.

>> @@ -1297,6 +1368,20 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
>> ? ?addressT offset = 0;
>> ? ?fragS *f;
>>
>> + ?if (bfd_get_section_flags (abfd, sec) & SEC_IN_MEMORY)
>
> 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.

OK, I'll try that.

Thanks for the review!

-cary


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