summaryrefslogtreecommitdiff
path: root/gold/target-reloc.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-20 21:21:24 +0000
committerIan Lance Taylor <iant@google.com>2007-12-20 21:21:24 +0000
commitfe8718a4637d92b3cd991a8f1a22d6d0a09bc6dd (patch)
tree1d8c345aa0b876471ab9e73e4f22c04d65aa61bf /gold/target-reloc.h
parent1f7efbae406ff9f2e8967d508bfae665501dc8ae (diff)
Convert more instances of off_t to be 32-bit types.
Diffstat (limited to 'gold/target-reloc.h')
-rw-r--r--gold/target-reloc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index 7c1d327eac..771869149c 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -148,7 +148,7 @@ relocate_section(
bool needs_special_offset_handling,
unsigned char* view,
typename elfcpp::Elf_types<size>::Elf_Addr view_address,
- off_t view_size)
+ section_size_type view_size)
{
typedef typename Reloc_types<sh_type, size, big_endian>::Reloc Reltype;
const int reloc_size = Reloc_types<sh_type, size, big_endian>::reloc_size;
@@ -161,7 +161,8 @@ relocate_section(
{
Reltype reloc(prelocs);
- off_t offset = reloc.get_r_offset();
+ section_offset_type offset =
+ convert_to_section_size_type(reloc.get_r_offset());
if (needs_special_offset_handling)
{
@@ -205,7 +206,7 @@ relocate_section(
view + offset, view_address + offset, view_size))
continue;
- if (offset < 0 || offset >= view_size)
+ if (offset < 0 || static_cast<section_size_type>(offset) >= view_size)
{
gold_error_at_location(relinfo, i, offset,
_("reloc has bad offset %zu"),