aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-02-17 19:32:29 +0000
committerRoland McGrath <roland@gnu.org>2002-02-17 19:32:29 +0000
commit9b09446441f1b3a888ca4a83247496e2e7900d3c (patch)
tree5f41c5bd09cdd0aba6ca601eb1a4bd7ad0f53df4
parent746f400783a0ce9297cc10c37d074699a2b7d371 (diff)
downloadglibc-9b09446441f1b3a888ca4a83247496e2e7900d3c.zip
glibc-9b09446441f1b3a888ca4a83247496e2e7900d3c.tar.gz
glibc-9b09446441f1b3a888ca4a83247496e2e7900d3c.tar.bz2
* sysdeps/powerpc/dl-machine.h (elf_machine_rela): Move local
variable LOADBASE so it's not declared when it's not used.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/powerpc/dl-machine.h13
2 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ee9fc02..baecd80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-17 Roland McGrath <roland@frob.com>
+
+ * sysdeps/powerpc/dl-machine.h (elf_machine_rela): Move local
+ variable LOADBASE so it's not declared when it's not used.
+
2002-02-16 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/times.c (__times) [NO_CREATION_TIME]: Don't try
diff --git a/sysdeps/powerpc/dl-machine.h b/sysdeps/powerpc/dl-machine.h
index 35b7e55..bf03c35 100644
--- a/sysdeps/powerpc/dl-machine.h
+++ b/sysdeps/powerpc/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. PowerPC version.
- Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -344,7 +344,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
Elf32_Addr *const reloc_addr)
{
const Elf32_Sym *const refsym = sym;
- Elf32_Word loadbase, finaladdr;
+ Elf32_Word finaladdr;
const int rinfo = ELF32_R_TYPE (reloc->r_info);
#ifndef RESOLVE_CONFLICT_FIND_MAP
@@ -359,17 +359,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
&& ELF32_ST_BIND (sym->st_info) == STB_LOCAL))
{
/* Has already been relocated. */
- loadbase = map->l_addr;
+ Elf32_Word loadbase = map->l_addr;
finaladdr = loadbase + reloc->r_addend;
}
else
{
- loadbase = (Elf32_Word) (char *) (RESOLVE (&sym, version,
- ELF32_R_TYPE(reloc->r_info)));
+ Elf32_Word loadbase
+ = (Elf32_Word) (char *) (RESOLVE (&sym, version,
+ ELF32_R_TYPE(reloc->r_info)));
if (sym == NULL)
{
/* Weak symbol that wasn't actually defined anywhere. */
- assert(loadbase == 0);
+ assert (loadbase == 0);
finaladdr = reloc->r_addend;
}
else