summary refs log tree commit diff
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-07-18 00:13:34 +0000
committerGreg McGary <greg@mcgary.org>2000-07-18 00:13:34 +0000
commit7884bf473e94661b2f1fe4250e8b6987e5965245 (patch)
treed4dfb4adacc99a35c33dac69b03f8ea4c11f1c18
parentabf7063390f46bd484d00c6a2d103a52cf058bd6 (diff)
downloadglibc-7884bf473e94661b2f1fe4250e8b6987e5965245.tar.gz
glibc-7884bf473e94661b2f1fe4250e8b6987e5965245.tar.xz
glibc-7884bf473e94661b2f1fe4250e8b6987e5965245.zip
* elf/dl-runtime.c (fixup): Trampoline passes unbounded pointer.
(profile_fixup): Don't define for __BOUNDED_POINTERS__. 
* sysdeps/i386/dl-machine.h: Don't use regparm attribute for 
__BOUNDED_POINTERS__. 
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Use non-regparm version 
for __BOUNDED_POINTERS__.
	* iconv/gconv_trans.c: Add #include <stdlib.h> to get malloc decl.

	* elf/dl-runtime.c (fixup): Trampoline passes unbounded pointer.
	(profile_fixup): Don't define for __BOUNDED_POINTERS__.
	* sysdeps/i386/dl-machine.h: Don't use regparm attribute for
	__BOUNDED_POINTERS__.
	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Use non-regparm version
	for __BOUNDED_POINTERS__.
-rw-r--r--ChangeLog9
-rw-r--r--elf/dl-runtime.c6
-rw-r--r--iconv/gconv_trans.c1
-rw-r--r--sysdeps/i386/dl-machine.h8
4 files changed, 19 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c79067975..1c00cdfb75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,6 +51,15 @@
 	* sysdeps/sparc/sparc64/memchr.S: Likewise.
 	* sysdeps/vax/memchr.s: Likewise.
 
+	* iconv/gconv_trans.c: Add #include <stdlib.h> to get malloc decl.
+
+	* elf/dl-runtime.c (fixup): Trampoline passes unbounded pointer.
+	(profile_fixup): Don't define for __BOUNDED_POINTERS__.
+	* sysdeps/i386/dl-machine.h: Don't use regparm attribute for
+	__BOUNDED_POINTERS__.
+	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Use non-regparm version
+	for __BOUNDED_POINTERS__.
+
 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
 
 	* iconv/gconv_open.c (__gconv_open): Initialize the __data
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index cb38dfe9d0..bff27e721e 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -47,7 +47,9 @@ fixup (
 # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
 # endif
-       struct link_map *l, ElfW(Word) reloc_offset)
+	/* GKM FIXME: Fix trampoline to pass bounds so we can do
+	   without the `__unbounded' qualifier.  */
+       struct link_map *__unbounded l, ElfW(Word) reloc_offset)
 {
   const ElfW(Sym) *const symtab
     = (const void *) D_PTR (l, l_info[DT_SYMTAB]);
@@ -119,7 +121,7 @@ fixup (
 }
 #endif
 
-#if !defined PROF && !defined ELF_MACHINE_NO_PLT
+#if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
 
 static ElfW(Addr) __attribute__ ((unused))
 profile_fixup (
diff --git a/iconv/gconv_trans.c b/iconv/gconv_trans.c
index 4fcb23209a..db7c567f1c 100644
--- a/iconv/gconv_trans.c
+++ b/iconv/gconv_trans.c
@@ -23,6 +23,7 @@
 #include <search.h>
 #include <stdint.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include <bits/libc-lock.h>
 #include "gconv_int.h"
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 3044edf84d..1f787a5319 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -60,14 +60,16 @@ elf_machine_load_address (void)
   return addr;
 }
 
-#ifndef PROF
+#if !defined PROF && !__BOUNDED_POINTERS__
 /* We add a declaration of this function here so that in dl-runtime.c
    the ELF_MACHINE_RUNTIME_TRAMPOLINE macro really can pass the parameters
    in registers.
 
    We cannot use this scheme for profiling because the _mcount call
    destroys the passed register information.  */
-static ElfW(Addr) fixup (struct link_map *l, ElfW(Word) reloc_offset)
+/* GKM FIXME: Fix trampoline to pass bounds so we can do
+   without the `__unbounded' qualifier.  */
+static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
      __attribute__ ((regparm (2), unused));
 static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
 				 ElfW(Addr) retaddr)
@@ -119,7 +121,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 
 /* This code is used in dl-runtime.c to call the `fixup' function
    and then redirect to the address it returns.  */
-#ifndef PROF
+#if !defined PROF && !__BOUNDED_POINTERS__
 # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
 	.text
 	.globl _dl_runtime_resolve