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/reloc.cc | |
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/reloc.cc')
-rw-r--r-- | gold/reloc.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gold/reloc.cc b/gold/reloc.cc index daa0ea8..481617d 100644 --- a/gold/reloc.cc +++ b/gold/reloc.cc @@ -586,8 +586,8 @@ Sized_relobj<size, big_endian>::write_sections(const unsigned char* pshdrs, // In the normal case, this input section is simply mapped to // the output section at offset OUTPUT_OFFSET. - // However, if OUTPUT_OFFSET == -1U, then input data is handled - // specially--e.g., a .eh_frame section. The relocation + // However, if OUTPUT_OFFSET == INVALID_ADDRESS, then input data is + // handled specially--e.g., a .eh_frame section. The relocation // routines need to check for each reloc where it should be // applied. For this case, we need an input/output view for the // entire contents of the section in the output file. We don't @@ -619,7 +619,7 @@ Sized_relobj<size, big_endian>::write_sections(const unsigned char* pshdrs, off_t view_start; section_size_type view_size; - if (output_offset != -1U) + if (output_offset != invalid_address) { view_start = output_section_offset + output_offset; view_size = convert_to_section_size_type(shdr.get_sh_size()); @@ -633,7 +633,7 @@ Sized_relobj<size, big_endian>::write_sections(const unsigned char* pshdrs, if (view_size == 0) continue; - gold_assert(output_offset == -1U + gold_assert(output_offset == invalid_address || output_offset + view_size <= output_section_size); unsigned char* view; @@ -641,7 +641,7 @@ Sized_relobj<size, big_endian>::write_sections(const unsigned char* pshdrs, { unsigned char* buffer = os->postprocessing_buffer(); view = buffer + view_start; - if (output_offset != -1U) + if (output_offset != invalid_address) { off_t sh_offset = shdr.get_sh_offset(); if (!rm.empty() && rm.back().file_offset > sh_offset) @@ -652,7 +652,7 @@ Sized_relobj<size, big_endian>::write_sections(const unsigned char* pshdrs, } else { - if (output_offset == -1U) + if (output_offset == invalid_address) view = of->get_input_output_view(view_start, view_size); else { @@ -667,11 +667,11 @@ Sized_relobj<size, big_endian>::write_sections(const unsigned char* pshdrs, pvs->view = view; pvs->address = os->address(); - if (output_offset != -1U) + if (output_offset != invalid_address) pvs->address += output_offset; pvs->offset = view_start; pvs->view_size = view_size; - pvs->is_input_output_view = output_offset == -1U; + pvs->is_input_output_view = output_offset == invalid_address; pvs->is_postprocessing_view = os->requires_postprocessing(); } @@ -772,7 +772,7 @@ Sized_relobj<size, big_endian>::relocate_sections( continue; } - gold_assert(output_offset != -1U + gold_assert(output_offset != invalid_address || this->relocs_must_follow_section_writes()); relinfo.reloc_shndx = i; @@ -784,7 +784,7 @@ Sized_relobj<size, big_endian>::relocate_sections( prelocs, reloc_count, os, - output_offset == -1U, + output_offset == invalid_address, (*pviews)[index].view, (*pviews)[index].address, (*pviews)[index].view_size); |