[patch] Add --compress-debug-sections option to gas
Alan Modra
amodra@gmail.com
Tue Jun 29 08:08:00 GMT 2010
More information about the Binutils mailing list
Tue Jun 29 08:08:00 GMT 2010
- Previous message (by thread): [patch] Add --compress-debug-sections option to gas
- Next message (by thread): [patch] Add --compress-debug-sections option to gas
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Jun 28, 2010 at 02:39:15PM -0700, Cary Coutant wrote:
> p.s. I'm not sure why my regenerated libbfd.h is different from the
> original -- nothing changed except for parameters to
> bfd_generic_get_relocated_section_contents() that used to be unnamed.
Someone hand edited the file. Now fixed.
> +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.
> + 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.
> @@ -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.
--
Alan Modra
Australia Development Lab, IBM
- Previous message (by thread): [patch] Add --compress-debug-sections option to gas
- Next message (by thread): [patch] Add --compress-debug-sections option to gas
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list