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] | |
> 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.
Here's an updated patch that builds a new frag list. Since a frag
requires the data to follow the struct immediately, it didn't work
with the nice clean interface I added to bfd. It did lead to a more
efficient way of compressing, however: I now just stream each frag
through the compression engine, building new compressed frags as the
compressed data comes out, using the same obstack. At the end, I
replace the old frag list with the new one. I had to move the
zlib-specific code into a separate source file, because I can't
include as.h and zlib.h in the same file.
-cary
bfd/ChangeLog:
* compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
* dwarf2.c (read_and_uncompress_section): New function.
(read_section): Call it.
(find_line): Likewise.
binutils/ChangeLog:
* objdump.c (load_specific_debug_section): Decompress section contents
before applying relocations.
* readelf.c (load_specific_debug_section): Update section size after
decompression.
gas/ChangeLog:
* Makefile.am: Add compress-debug.c and compress-debug.h.
* Makefile.in: Regenerate.
* config.in: Add HAVE_ZLIB_H.
* configure.in: Check for zlib.h.
* configure: Regenerate.
* as.c (parse_args): Add --compress-debug-sections and
--nocompress-debug-sections.
* as.h (flag_compress_debug): New variable.
* compress-debug.c: New file.
* compress-debug.h: New file.
* write.c: Include compress-debug.h.
(compress_debug): New function.
(write_object_file): Compress debug sections if requested.
Attachment:
compress-debug-patch-2.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |