diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-07-12 10:50:25 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-07-12 10:50:40 -0700 |
commit | 480586639d6b814b2e87f6f106b8635cf7442b20 (patch) | |
tree | 8fcd160ca3fd8b27770e883a58937c1e50e3bc38 /gold/object.h | |
parent | 8d6dbeb44ca93b836e3af8f8d3993997bf347112 (diff) | |
download | gdb-480586639d6b814b2e87f6f106b8635cf7442b20.zip gdb-480586639d6b814b2e87f6f106b8635cf7442b20.tar.gz gdb-480586639d6b814b2e87f6f106b8635cf7442b20.tar.bz2 |
Add SHF_COMPRESSED section decompression to gold
This patch adds SHF_COMPRESSED section decompression to gold.
PR gold/18321
* compressed_output.h (decompress_input_section): Add arguments
for ELF class, big endian and sh_flags.
* compressed_output.cc (decompress_input_section): Likewise.
Support the SHF_COMPRESSED section.
* dynobj.h (Dynobj): Add elfsize and is_big_endian member
functions.
* plugin.h (Pluginobj): Likewise.
* layout.cc (Layout::get_output_section_flags): Also clear the
SHF_COMPRESSED bit.
* object.h (Compressed_section_info): Add flag to store sh_flags.
(Object): Add pure virtual elfsize and is_big_endian member
functions.
* object.cc (need_decompressed_section): Don't skip the ".zdebug"
prefix here.
(build_compressed_section_map): Check SHF_COMPRESSED for
uncompressed size. Store sh_flags in Compressed_section_info.
Pass size, big_endian and sh_flags to decompress_input_section.
Skip the ".debug"/".zdebug" prefix when passing section name to
need_decompressed_section.
(Sized_relobj_file<size, big_endian>::do_find_special_section):
Don't check ".zdebug_*" sections.
(Object::decompressed_section_contents): Pass ELF class, big
endian and sh_flags to decompress_input_section.
* reloc.cc (Sized_relobj_file<size, big_endian>::write_sections):
Likewise.
* testsuite/Makefile.am (check_DATA): Add
debug_msg_cdebug_gabi.err and gdb_index_test_2_gabi.stdout.
(MOSTLYCLEANFILES): Add debug_msg_cdebug_gabi.err and
gdb_index_test_2_gabi.stdout.
(debug_msg_cdebug_gabi.o): New.
(odr_violation1_cdebug_gabi.o): Likewise.
(odr_violation2_cdebug_gabi.o): Likewise.
(debug_msg_cdebug_gabi.err): Likewise.
(check_SCRIPTS): Add gdb_index_test_2_gabi.sh.
(gdb_index_test_cdebug_gabi.o): Likewise.
(gdb_index_test_2_gabi): Likewise.
(gdb_index_test_2_gabi.stdout): Likewise.
* testsuite/gdb_index_test_2_gabi.sh: New file.
* testsuite/Makefile.in: Regenerated.
Diffstat (limited to 'gold/object.h')
-rw-r--r-- | gold/object.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gold/object.h b/gold/object.h index a3d5d0e..e8f74ac 100644 --- a/gold/object.h +++ b/gold/object.h @@ -320,6 +320,7 @@ class Got_offset_list struct Compressed_section_info { section_size_type size; + elfcpp::Elf_Xword flag; const unsigned char* contents; }; typedef std::map<unsigned int, Compressed_section_info> Compressed_section_map; @@ -380,6 +381,12 @@ class Object is_dynamic() const { return this->is_dynamic_; } + // Return the word size of the object file. + virtual int elfsize() const = 0; + + // Return TRUE if this is a big-endian object file. + virtual bool is_big_endian() const = 0; + // Return whether this object is needed--true if it is a dynamic // object which defines some symbol referenced by a regular object. // We keep the flag here rather than in Dynobj for convenience when |