diff options
author | Cary Coutant <ccoutant@google.com> | 2008-09-29 21:10:26 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2008-09-29 21:10:26 +0000 |
commit | eff458138e2978ee9a3aef4ebee40d53da11e764 (patch) | |
tree | e3dc9d42321c76802d091efde97049a536c77ef4 /gold/target-reloc.h | |
parent | 1927a18f3190247ad2b049b46e5bbe00f889507a (diff) | |
download | gdb-eff458138e2978ee9a3aef4ebee40d53da11e764.zip gdb-eff458138e2978ee9a3aef4ebee40d53da11e764.tar.gz 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/target-reloc.h')
-rw-r--r-- | gold/target-reloc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/target-reloc.h b/gold/target-reloc.h index 1cdc244..935d76b 100644 --- a/gold/target-reloc.h +++ b/gold/target-reloc.h @@ -450,6 +450,7 @@ relocate_for_relocatable( typedef typename Reloc_types<sh_type, size, big_endian>::Reloc_write Reltype_write; const int reloc_size = Reloc_types<sh_type, size, big_endian>::reloc_size; + const Address invalid_address = static_cast<Address>(0) - 1; Sized_relobj<size, big_endian>* const object = relinfo->object; const unsigned int local_count = object->local_symbol_count(); @@ -524,7 +525,7 @@ relocate_for_relocatable( Address offset = reloc.get_r_offset(); Address new_offset; - if (offset_in_output_section != -1U) + if (offset_in_output_section != invalid_address) new_offset = offset + offset_in_output_section; else { @@ -543,7 +544,7 @@ relocate_for_relocatable( if (!parameters->options().relocatable()) { new_offset += view_address; - if (offset_in_output_section != -1U) + if (offset_in_output_section != invalid_address) new_offset -= offset_in_output_section; } |