aboutsummaryrefslogtreecommitdiff
path: root/gold/tls.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/tls.h
parent1f7efbae406ff9f2e8967d508bfae665501dc8ae (diff)
downloadgdb-fe8718a4637d92b3cd991a8f1a22d6d0a09bc6dd.zip
gdb-fe8718a4637d92b3cd991a8f1a22d6d0a09bc6dd.tar.gz
gdb-fe8718a4637d92b3cd991a8f1a22d6d0a09bc6dd.tar.bz2
Convert more instances of off_t to be 32-bit types.
Diffstat (limited to 'gold/tls.h')
-rw-r--r--gold/tls.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gold/tls.h b/gold/tls.h
index 7103d3f..ab20e74 100644
--- a/gold/tls.h
+++ b/gold/tls.h
@@ -50,10 +50,11 @@ inline void
check_range(const Relocate_info<size, big_endian>* relinfo,
size_t relnum,
typename elfcpp::Elf_types<size>::Elf_Addr rel_offset,
- off_t view_size, off_t off)
+ section_size_type view_size, int off)
{
- off_t offset = rel_offset + off;
- if (offset < 0 || offset > view_size)
+ typename elfcpp::Elf_types<size>::Elf_Addr offset = rel_offset + off;
+ // Elf_Addr is unsigned, so this also tests for signed offset < 0.
+ if (offset > view_size)
gold_error_at_location(relinfo, relnum, rel_offset,
_("TLS relocation out of range"));
}