From eff458138e2978ee9a3aef4ebee40d53da11e764 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Mon, 29 Sep 2008 21:10:26 +0000 Subject: * 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. --- gold/object.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gold/object.cc') diff --git a/gold/object.cc b/gold/object.cc index d8f5ec8..f7dcda8 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -926,7 +926,7 @@ Sized_relobj::do_layout(Symbol_table* symtab, { // Do not include this section in the link. out_sections[i] = NULL; - out_section_offsets[i] = -1U; + out_section_offsets[i] = invalid_address; continue; } @@ -967,7 +967,7 @@ Sized_relobj::do_layout(Symbol_table* symtab, out_sections[i] = os; if (offset == -1) - out_section_offsets[i] = -1U; + out_section_offsets[i] = invalid_address; else out_section_offsets[i] = convert_types(offset); @@ -1004,7 +1004,7 @@ Sized_relobj::do_layout(Symbol_table* symtab, if (data_section == NULL) { out_sections[i] = NULL; - out_section_offsets[i] = -1U; + out_section_offsets[i] = invalid_address; continue; } @@ -1014,7 +1014,7 @@ Sized_relobj::do_layout(Symbol_table* symtab, Output_section* os = layout->layout_reloc(this, i, shdr, data_section, rr); out_sections[i] = os; - out_section_offsets[i] = -1U; + out_section_offsets[i] = invalid_address; } // Handle the .eh_frame sections at the end. @@ -1042,7 +1042,7 @@ Sized_relobj::do_layout(Symbol_table* symtab, &offset); out_sections[i] = os; if (offset == -1) - out_section_offsets[i] = -1U; + out_section_offsets[i] = invalid_address; else out_section_offsets[i] = convert_types(offset); @@ -1266,7 +1266,7 @@ Sized_relobj::do_finalize_local_symbols(unsigned int index, // so we leave the input value unchanged here. continue; } - else if (out_offsets[shndx] == -1U) + else if (out_offsets[shndx] == invalid_address) { // This is a SHF_MERGE section or one which otherwise // requires special handling. We get the output address @@ -1573,7 +1573,7 @@ Sized_relobj::map_to_kept_section( *found = true; Output_section* os = kept->object_->output_section(kept->shndx_); Address offset = kept->object_->get_output_section_offset(kept->shndx_); - gold_assert(os != NULL && offset != -1U); + gold_assert(os != NULL && offset != invalid_address); return os->address() + offset; } *found = false; -- cgit v1.1