aboutsummaryrefslogtreecommitdiff
path: root/gold/object.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-27 22:38:18 +0000
committerIan Lance Taylor <iant@google.com>2008-02-27 22:38:18 +0000
commit7019cd256559b48bc642fcb8ff9a4ea9e98bced7 (patch)
treec88847678e9c212b482d4a30beccdd74abdd90c6 /gold/object.h
parent20b4711e0556d73b7a16250447ee5ca505b834db (diff)
downloadgdb-7019cd256559b48bc642fcb8ff9a4ea9e98bced7.zip
gdb-7019cd256559b48bc642fcb8ff9a4ea9e98bced7.tar.gz
gdb-7019cd256559b48bc642fcb8ff9a4ea9e98bced7.tar.bz2
Implement -q/--emit-relocs.
Diffstat (limited to 'gold/object.h')
-rw-r--r--gold/object.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/gold/object.h b/gold/object.h
index 4011bdc..80047b0 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -111,6 +111,8 @@ struct Section_relocs
Output_section* output_section;
// Whether this section has special handling for offsets.
bool needs_special_offset_handling;
+ // Whether the data section is allocated (has the SHF_ALLOC flag set).
+ bool is_data_section_allocated;
};
// Relocations in an object file. This is read in read_relocs and
@@ -1312,6 +1314,42 @@ class Sized_relobj : public Relobj
relocate_sections(const General_options& options, const Symbol_table*,
const Layout*, const unsigned char* pshdrs, Views*);
+ // Scan the input relocations for --emit-relocs.
+ void
+ emit_relocs_scan(const General_options&, Symbol_table*, Layout*,
+ const unsigned char* plocal_syms,
+ const Read_relocs_data::Relocs_list::iterator&);
+
+ // Scan the input relocations for --emit-relocs, templatized on the
+ // type of the relocation section.
+ template<int sh_type>
+ void
+ emit_relocs_scan_reltype(const General_options&, Symbol_table*, Layout*,
+ const unsigned char* plocal_syms,
+ const Read_relocs_data::Relocs_list::iterator&,
+ Relocatable_relocs*);
+
+ // Emit the relocs for --emit-relocs.
+ void
+ emit_relocs(const Relocate_info<size, big_endian>*, unsigned int,
+ unsigned int sh_type, const unsigned char* prelocs,
+ size_t reloc_count, Output_section*, off_t output_offset,
+ unsigned char* view, Address address,
+ section_size_type view_size,
+ unsigned char* reloc_view, section_size_type reloc_view_size);
+
+ // Emit the relocs for --emit-relocs, templatized on the type of the
+ // relocation section.
+ template<int sh_type>
+ void
+ emit_relocs_reltype(const Relocate_info<size, big_endian>*, unsigned int,
+ const unsigned char* prelocs, size_t reloc_count,
+ Output_section*, off_t output_offset,
+ unsigned char* view, Address address,
+ section_size_type view_size,
+ unsigned char* reloc_view,
+ section_size_type reloc_view_size);
+
// Initialize input to output maps for section symbols in merged
// sections.
void