aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/hppa
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-22 03:33:47 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-22 03:33:47 +0000
commit463468350f1735034d9f1b4a3d4a50a5a794620e (patch)
tree7b61cf3d69e5ab2394131afbe11175db0b3ab566 /sysdeps/hppa
parent5a74e68a52e0ef995733b27044dffeb8c7ce3dcd (diff)
downloadglibc-463468350f1735034d9f1b4a3d4a50a5a794620e.tar
glibc-463468350f1735034d9f1b4a3d4a50a5a794620e.tar.gz
glibc-463468350f1735034d9f1b4a3d4a50a5a794620e.tar.bz2
glibc-463468350f1735034d9f1b4a3d4a50a5a794620e.zip
Update.
2001-04-21 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Correct check for invalid offset. 2001-04-21 Ulrich Drepper <drepper@redhat.com> * posix/getopt.h: Treat __cplusplus like __STDC__. 2001-04-20 John S. Marvin <jsm@fc.hp.com> * sysdeps/unix/sysv/linux/hppa/clone.S: Fix clone system call entry point stub. 2001-04-20 Richard Hirst <rhirst@linuxcare.com> * elf/elf.h: Corrected R_PARISC_DIR14R (should be 6, not 5), and added R_PARISC_DPREL21L and R_PARISC_DPREL14R for modutils. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Removed ptrace entry so the ptrace.c wrapper is used. 2001-04-20 Alan Modra <amodra@one.net.au> * sysdeps/hppa/dl-lookupcfg.h (_dl_function_address): Prototype. (DL_FUNCTION_ADDRESS): Define. (DL_DT_INIT_ADDRESS): Define. (DL_DT_FINI_ADDRESS): Define. * sysdeps/hppa/Versions: Add _dl_function_address. * sysdeps/hppa/dl-machine.h (ELF_MACHINE_START_ADDRESS): Define. * sysdeps/hppa/dl-symaddr.c (_dl_start_address): Rename to _dl_function_address.
Diffstat (limited to 'sysdeps/hppa')
-rw-r--r--sysdeps/hppa/Versions1
-rw-r--r--sysdeps/hppa/dl-lookupcfg.h13
-rw-r--r--sysdeps/hppa/dl-machine.h4
-rw-r--r--sysdeps/hppa/dl-symaddr.c2
4 files changed, 19 insertions, 1 deletions
diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions
index 0c447d9f28..c5f35d4971 100644
--- a/sysdeps/hppa/Versions
+++ b/sysdeps/hppa/Versions
@@ -2,5 +2,6 @@ ld {
GLIBC_2.2 {
# hppa specific functions in the dynamic linker, but used by libc.so.
_dl_symbol_address; _dl_unmap; _dl_lookup_address;
+ _dl_function_address;
}
}
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index 4f5f8998a7..118c4d0c58 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -34,3 +34,16 @@ Elf32_Addr _dl_lookup_address (const void *address);
void _dl_unmap (struct link_map *map);
#define DL_UNMAP(map) _dl_unmap (map)
+
+extern Elf32_Addr _dl_function_address (const struct link_map *map,
+ Elf32_Addr start);
+
+#define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr)
+
+/* The test for "addr & 2" below is to accomodate old binaries which
+ violated the ELF ABI by pointing DT_INIT and DT_FINI at a function
+ pointer. */
+#define DL_DT_INIT_ADDRESS(map, addr) \
+ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
+#define DL_DT_FINI_ADDRESS(map, addr) \
+ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index f8a8e7bcee..a3437b557a 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -448,6 +448,10 @@ __dl_fini_plabel:
/* We only use RELA. */
#define ELF_MACHINE_NO_REL 1
+/* Return the address of the entry point. */
+#define ELF_MACHINE_START_ADDRESS(map, start) \
+ DL_FUNCTION_ADDRESS (map, start)
+
#endif /* !dl_machine_h */
/* These are only actually used where RESOLVE_MAP is defined, anyway. */
diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c
index 038404a48b..49c1216664 100644
--- a/sysdeps/hppa/dl-symaddr.c
+++ b/sysdeps/hppa/dl-symaddr.c
@@ -33,7 +33,7 @@ _dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref)
}
ElfW(Addr)
-_dl_start_address (const struct link_map *map, ElfW(Addr) start)
+_dl_function_address (const struct link_map *map, ElfW(Addr) start)
{
return __hppa_make_fptr (map, start, &__fptr_root, NULL);
}