aboutsummaryrefslogtreecommitdiff
path: root/gold/object.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2008-09-29 21:10:26 +0000
committerCary Coutant <ccoutant@google.com>2008-09-29 21:10:26 +0000
commiteff458138e2978ee9a3aef4ebee40d53da11e764 (patch)
treee3dc9d42321c76802d091efde97049a536c77ef4 /gold/object.h
parent1927a18f3190247ad2b049b46e5bbe00f889507a (diff)
downloadfsf-binutils-gdb-eff458138e2978ee9a3aef4ebee40d53da11e764.zip
fsf-binutils-gdb-eff458138e2978ee9a3aef4ebee40d53da11e764.tar.gz
fsf-binutils-gdb-eff458138e2978ee9a3aef4ebee40d53da11e764.tar.bz2
* mapfile.cc (Mapfile::print_input_section): Change -1U to -1ULL.
* object.cc (Sized_relobj::do_layout): Use constant invalid_address instead of -1U. (Sized_relobj::do_finalize_local_symbols): Likewise. (Sized_relobj::map_to_kept_section): Likewise. * object.h (Sized_relobj::invalid_address): New constant. (Sized_relobj::do_output_section_offset): Check for invalid_address and return -1ULL. * output.cc (Output_reloc::local_section_offset): Use constant invalid_address instead of -1U. (Output_reloc::get_address): Likewise. (Output_section::output_address): Change -1U to -1ULL. * output.h (Output_reloc::invalid_address): New constant. * reloc.cc (Sized_relobj::write_sections): Use constant invalid_address instead of -1U. (Sized_relobj::relocate_sections): Likewise. * symtab.cc (Symbol_table::sized_finalize_symbol): Handle symbol values for merge sections. * target-reloc.h (relocate_for_relocatable): Use constant invalid_address instead of -1U.
Diffstat (limited to 'gold/object.h')
-rw-r--r--gold/object.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gold/object.h b/gold/object.h
index 1c4fc67..fcb5d31 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -1202,6 +1202,8 @@ class Sized_relobj : public Relobj
typedef std::vector<Symbol*> Symbols;
typedef std::vector<Symbol_value<size> > Local_values;
+ static const Address invalid_address = static_cast<Address>(0) - 1;
+
Sized_relobj(const std::string& name, Input_file* input_file, off_t offset,
const typename elfcpp::Ehdr<size, big_endian>&);
@@ -1457,7 +1459,12 @@ class Sized_relobj : public Relobj
// Get the offset of a section.
uint64_t
do_output_section_offset(unsigned int shndx) const
- { return this->get_output_section_offset(shndx); }
+ {
+ Address off = this->get_output_section_offset(shndx);
+ if (off == invalid_address)
+ return -1ULL;
+ return off;
+ }
// Set the offset of a section.
void
@@ -1699,7 +1706,7 @@ class Sized_relobj : public Relobj
// for TLS symbols, indexed by symbol number.
Local_got_offsets local_got_offsets_;
// For each input section, the offset of the input section in its
- // output section. This is -1U if the input section requires a
+ // output section. This is INVALID_ADDRESS if the input section requires a
// special mapping.
std::vector<Address> section_offsets_;
// Table mapping discarded comdat sections to corresponding kept sections.