diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/write.c | 9 |
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; |