aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/alpha/dl-machine.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-02-28 15:23:48 +0000
committerUlrich Drepper <drepper@redhat.com>2001-02-28 15:23:48 +0000
commitcb8023f9389a8311dff4917b0496a5a34aa1c3c3 (patch)
tree54941e2c549bca186ac32feb9b79857fd955ea5e /sysdeps/alpha/dl-machine.h
parent773b640096dc53e9052ee2385bb82687d6dd485f (diff)
downloadglibc-cb8023f9389a8311dff4917b0496a5a34aa1c3c3.tar
glibc-cb8023f9389a8311dff4917b0496a5a34aa1c3c3.tar.gz
glibc-cb8023f9389a8311dff4917b0496a5a34aa1c3c3.tar.bz2
glibc-cb8023f9389a8311dff4917b0496a5a34aa1c3c3.zip
(elf_machine_rela): Don't handle relocations which are not in ld.so if
RTLD_BOOTSTRAP is defined.
Diffstat (limited to 'sysdeps/alpha/dl-machine.h')
-rw-r--r--sysdeps/alpha/dl-machine.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 73c6cbde19..5a17ca230d 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -500,8 +500,10 @@ elf_machine_rela (struct link_map *map,
memcpy (reloc_addr_1, &reloc_addr_val, 8);
}
}
+#ifndef RTLD_BOOTSTRAP
else if (r_type == R_ALPHA_NONE)
return;
+#endif
else
{
Elf64_Addr loadbase, sym_value;
@@ -512,8 +514,9 @@ elf_machine_rela (struct link_map *map,
if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
- else if (r_type == R_ALPHA_JMP_SLOT)
+ else if (r_type == R_ALPHA_JMP_SLOT)
elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
+#ifndef RTLD_BOOTSTRAP
else if (r_type == R_ALPHA_REFQUAD)
{
void *reloc_addr_1 = reloc_addr;
@@ -522,7 +525,6 @@ elf_machine_rela (struct link_map *map,
/* Load value without causing unaligned trap. */
memcpy (&reloc_addr_val, reloc_addr_1, 8);
sym_value += reloc_addr_val;
-#ifndef RTLD_BOOTSTRAP
if (map == &_dl_rtld_map)
{
/* Undo the relocation done here during bootstrapping.
@@ -536,10 +538,10 @@ elf_machine_rela (struct link_map *map,
sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
sym_value -= reloc->r_addend;
}
-#endif
/* Store value without causing unaligned trap. */
memcpy (reloc_addr_1, &sym_value, 8);
}
+#endif
else
_dl_reloc_bad_type (map, r_type, 0);
}