aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-04-06 09:01:43 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-04-06 09:02:52 -0700
commit4aa90cc007ff1e7c6525b3f5e573e3a4242091fa (patch)
treec2facfd8e1e98ecf2064cd76e8d8f4b563b49436 /gas
parentfd5136e57ca26072fa015a7563ba019b1b2b7d73 (diff)
downloadgdb-4aa90cc007ff1e7c6525b3f5e573e3a4242091fa.zip
gdb-4aa90cc007ff1e7c6525b3f5e573e3a4242091fa.tar.gz
gdb-4aa90cc007ff1e7c6525b3f5e573e3a4242091fa.tar.bz2
Use bfd_putb64/bfd_getb64
bfd/ * compress.c (get_uncompressed_size): Removed. (bfd_compress_section_contents): Use bfd_putb64 to write uncompressed section size. (bfd_init_section_decompress_status): Replace get_uncompressed_size with bfd_getb64. gas/ * write.c (compress_debug): Use bfd_putb64 to write uncompressed section size.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/write.c9
2 files changed, 6 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f2a1bf2..c896dea 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * write.c (compress_debug): Use bfd_putb64 to write uncompressed
+ section size.
+
2015-04-05 H.J. Lu <hongjiu.lu@intel.com>
* write.c (compress_debug): Don't write the zlib header if
diff --git a/gas/write.c b/gas/write.c
index 248255b..1ae47a9 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1523,14 +1523,7 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
return;
memcpy (header, "ZLIB", 4);
- header[11] = uncompressed_size; uncompressed_size >>= 8;
- header[10] = uncompressed_size; uncompressed_size >>= 8;
- header[9] = uncompressed_size; uncompressed_size >>= 8;
- header[8] = uncompressed_size; uncompressed_size >>= 8;
- header[7] = uncompressed_size; uncompressed_size >>= 8;
- header[6] = uncompressed_size; uncompressed_size >>= 8;
- header[5] = uncompressed_size; uncompressed_size >>= 8;
- header[4] = uncompressed_size;
+ bfd_putb64 (uncompressed_size, header + 4);
/* Replace the uncompressed frag list with the compressed frag list. */
seginfo->frchainP->frch_root = first_newf;