This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed, PATCH] Extract get_uncompressed_size
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 6 Apr 2015 00:26:16 -0400 (EDT)
- Subject: Re: [committed, PATCH] Extract get_uncompressed_size
- Authentication-results: sourceware.org; auth=none
- References: <20150404145520 dot GA6872 at gmail dot com>
On Sat, 4 Apr 2015, H.J. Lu wrote:
>
> * compress.c (get_uncompressed_size): New. Extracted from ...
> (bfd_init_section_decompress_status): This. Use it.
> +static bfd_size_type
> +get_uncompressed_size (bfd_byte *compressed_size_buffer)
> +{
> + bfd_size_type uncompressed_size = compressed_size_buffer[0];
> + uncompressed_size <<= 8;
...
> + uncompressed_size += compressed_size_buffer[7];
> + return uncompressed_size;;
> +}
I know you're just copying code, but for the next copy, please
consider also change to use bfd functions, in this case bfd_getb64?
brgds, H-P