diff options
author | Roland McGrath <roland@gnu.org> | 1996-07-14 10:04:21 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-07-14 10:04:21 +0000 |
commit | c928de790200bc7a81224377d35a91a6103387de (patch) | |
tree | 470cac87d54b6d7fe1d25f3a4b0864779de900fe | |
parent | 2064087b5f1a0a3a189fcd6a3012376f5545be31 (diff) | |
download | glibc-c928de790200bc7a81224377d35a91a6103387de.zip glibc-c928de790200bc7a81224377d35a91a6103387de.tar.gz glibc-c928de790200bc7a81224377d35a91a6103387de.tar.bz2 |
* elf/dl-deps.c (_dl_map_object_deps): Start TAILP at last preload.
* elf/dl-open.c (_dl_open): Force an indirect call for
_dl_relocate_object so there is no chance a PLT fixup will be done
and clobber _dl_global_scope before our call happens.
* sysdeps/i386/fpu/__math.h (tan): Correct output constraint from =u
to =t; must operate on top of fp reg stack, not second from top.
Correct input constraint to 0 from t; must be explicit when input and
output are the same register.
(floor): Use __volatile instead of volatile.
(ceil): Likewise.
* manual/Makefile ($(objpfx)stamp%-$(subdir)): Separate rule from
other targets.
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | elf/dl-deps.c | 7 | ||||
-rw-r--r-- | elf/dl-open.c | 12 | ||||
-rw-r--r-- | manual/Makefile | 12 | ||||
-rw-r--r-- | sysdeps/i386/fpu/__math.h | 22 |
5 files changed, 50 insertions, 19 deletions
@@ -1,6 +1,20 @@ Sun Jul 14 01:51:39 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> - * manual/Makefile (glibc-targets): Variable and targets removed. + * elf/dl-deps.c (_dl_map_object_deps): Start TAILP at last preload. + + * elf/dl-open.c (_dl_open): Force an indirect call for + _dl_relocate_object so there is no chance a PLT fixup will be done + and clobber _dl_global_scope before our call happens. + + * sysdeps/i386/fpu/__math.h (tan): Correct output constraint from =u + to =t; must operate on top of fp reg stack, not second from top. + Correct input constraint to 0 from t; must be explicit when input and + output are the same register. + (floor): Use __volatile instead of volatile. + (ceil): Likewise. + + * manual/Makefile ($(objpfx)stamp%-$(subdir)): Separate rule from + other targets. Sat Jul 13 23:50:17 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> diff --git a/elf/dl-deps.c b/elf/dl-deps.c index 28733ab..8521c50 100644 --- a/elf/dl-deps.c +++ b/elf/dl-deps.c @@ -45,7 +45,10 @@ _dl_map_object_deps (struct link_map *map, } /* Terminate the list. */ - head[nlist++].next = NULL; + head[nlist].next = NULL; + + /* Start here for adding dependencies to the list. */ + tailp = &head[nlist++]; /* We use `l_reserved' as a mark bit to detect objects we have already put in the search list and avoid adding duplicate elements later in @@ -56,7 +59,7 @@ _dl_map_object_deps (struct link_map *map, dependencies and appending them to the list as we step through it. This produces a flat, ordered list that represents a breadth-first search of the dependency tree. */ - for (scanp = tailp = head; scanp; scanp = scanp->next) + for (scanp = head; scanp; scanp = scanp->next) { struct link_map *l = scanp->map; diff --git a/elf/dl-open.c b/elf/dl-open.c index 058c3e5..021c4be 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -52,8 +52,16 @@ _dl_open (const char *file, int mode) { if (! l->l_relocated) { - _dl_relocate_object (l, _dl_object_relocation_scope (l), - (mode & RTLD_BINDING_MASK) == RTLD_LAZY); + /* We use an indirect call call for _dl_relocate_object because + we must avoid using the PLT in the call. If our PLT entry for + _dl_relocate_object hasn't been used yet, then the dynamic + linker fixup routine will clobber _dl_global_scope during its + work. We must be sure that nothing will require a PLT fixup + between when _dl_object_relocation_scope returns and when we + enter the dynamic linker's code (_dl_relocate_object). */ + __typeof (_dl_relocate_object) *reloc = &_dl_relocate_object; + (*reloc) (l, _dl_object_relocation_scope (l), + (mode & RTLD_BINDING_MASK) == RTLD_LAZY); *_dl_global_scope_end = NULL; } diff --git a/manual/Makefile b/manual/Makefile index eb9fff7..6db73cd 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -151,14 +151,20 @@ subdir_%: % ; # For targets we don't define, do nothing. subdir_%: ; +# These are targets that each glibc subdirectory is expected to understand. +# ../Rules defines them for code subdirectories; for us, they are no-ops. +glibc-targets := subdir_lib objects objs others tests subdir_lint.out \ + subdir_echo-headers subdir_echo-distinfo stubs +.PHONY: $(glibc-targets) +$(glibc-targets): + # Create stamp files if they don't exist, so the parent makefile's rules for # updating the library archives are happy with us, and never think we have # changed the library. -.PHONY: lib stubs lib: $(foreach o,$(object-suffixes),$(objpfx)stamp$o-$(subdir)) stubs: $(common-objpfx)stub-manual -$(objpfx)stamp%-$(subdir) $(common-objpfx)stub-manual ../po/manual.pot: - cp /dev/null $@ +$(common-objpfx)stub-manual ../po/manual.pot:; cp /dev/null $@ +$(objpfx)stamp%-$(subdir):; cp /dev/null $@ # The top-level glibc Makefile expects subdir_install to update the stubs file. subdir_install: stubs diff --git a/sysdeps/i386/fpu/__math.h b/sysdeps/i386/fpu/__math.h index 9648ef5..3efa751 100644 --- a/sysdeps/i386/fpu/__math.h +++ b/sysdeps/i386/fpu/__math.h @@ -120,7 +120,7 @@ tan (double __x) register double __value; __asm __volatile__ ("fptan" - : "=u" (__value) : "t" (__x)); + : "=t" (__value) : "0" (__x)); return __value; } @@ -334,13 +334,13 @@ __MATH_INLINE double floor (double __x) { register double __value; - volatile short __cw, __cwtmp; + __volatile unsigned short int __cw, __cwtmp; - __asm volatile ("fnstcw %0" : "=m" (__cw)); + __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */ - __asm volatile ("fldcw %0" : : "m" (__cwtmp)); - __asm volatile ("frndint" : "=t" (__value) : "0" (__x)); - __asm volatile ("fldcw %0" : : "m" (__cw)); + __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); + __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); + __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } @@ -350,13 +350,13 @@ __MATH_INLINE double ceil (double __x) { register double __value; - volatile short __cw, __cwtmp; + __volatile unsigned short int __cw, __cwtmp; - __asm volatile ("fnstcw %0" : "=m" (__cw)); + __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; /* rounding up */ - __asm volatile ("fldcw %0" : : "m" (__cwtmp)); - __asm volatile ("frndint" : "=t" (__value) : "0" (__x)); - __asm volatile ("fldcw %0" : : "m" (__cw)); + __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); + __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); + __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } |