mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
1998-09-20 09:37 Ulrich Drepper <drepper@cygnus.com> * elf/Versions [GLIBC_2.1] (libc): Add __fpu_control. * elf/elf.h: Add AT_FPUCW. * elf/Makefile (dl-routines): Add fpu_control. (elide-routines.os): Add fpu_control. (rtld-routines): Add fpu_control. * math/Makefile (aux): Remove fpu_control. * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Handle AT_FPUCW. (_dl_show_auxv): Likewise. * sysdeps/unix/sysv/linux/init-first.c (init): Use __setfpucw only if different from OS default. * stdio-common/tstscanf.c: Add test case for (nil).
This commit is contained in:
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
|||||||
|
1998-09-20 09:37 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* elf/Versions [GLIBC_2.1] (libc): Add __fpu_control.
|
||||||
|
* elf/elf.h: Add AT_FPUCW.
|
||||||
|
* elf/Makefile (dl-routines): Add fpu_control.
|
||||||
|
(elide-routines.os): Add fpu_control.
|
||||||
|
(rtld-routines): Add fpu_control.
|
||||||
|
* math/Makefile (aux): Remove fpu_control.
|
||||||
|
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Handle AT_FPUCW.
|
||||||
|
(_dl_show_auxv): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/init-first.c (init): Use __setfpucw only
|
||||||
|
if different from OS default.
|
||||||
|
|
||||||
|
* stdio-common/tstscanf.c: Add test case for (nil).
|
||||||
|
|
||||||
1998-09-18 17:41 Ulrich Drepper <drepper@cygnus.com>
|
1998-09-18 17:41 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* libio/fileops.c (_IO_new_file_underflow): Before allocating
|
* libio/fileops.c (_IO_new_file_underflow): Before allocating
|
||||||
|
@ -28,13 +28,15 @@ routines = $(dl-routines) dl-open dl-close dl-symbol dl-support \
|
|||||||
# profiled libraries.
|
# profiled libraries.
|
||||||
dl-routines = $(addprefix dl-,load cache lookup object reloc deps \
|
dl-routines = $(addprefix dl-,load cache lookup object reloc deps \
|
||||||
runtime error init fini debug misc \
|
runtime error init fini debug misc \
|
||||||
version profile)
|
version profile) \
|
||||||
|
fpu_control
|
||||||
# But they are absent from the shared libc, because that code is in ld.so.
|
# But they are absent from the shared libc, because that code is in ld.so.
|
||||||
elide-routines.os = $(dl-routines) dl-support enbl-secure
|
elide-routines.os = $(dl-routines) dl-support enbl-secure fpu_control
|
||||||
|
|
||||||
# ld.so uses those routines, plus some special stuff for being the program
|
# ld.so uses those routines, plus some special stuff for being the program
|
||||||
# interpreter and operating independent of libc.
|
# interpreter and operating independent of libc.
|
||||||
rtld-routines := rtld $(dl-routines) dl-sysdep dl-environ dl-minimal
|
rtld-routines := rtld $(dl-routines) dl-sysdep dl-environ dl-minimal \
|
||||||
|
fpu_control
|
||||||
distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
|
distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
|
||||||
dl-hash.h soinit.c sofini.c ldd.bash.in eval.c \
|
dl-hash.h soinit.c sofini.c ldd.bash.in eval.c \
|
||||||
genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \
|
genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \
|
||||||
|
@ -19,7 +19,7 @@ libc {
|
|||||||
GLIBC_2.1 {
|
GLIBC_2.1 {
|
||||||
# global variables
|
# global variables
|
||||||
_dl_profile; _dl_profile_map; _dl_profile_output; _dl_start_profile;
|
_dl_profile; _dl_profile_map; _dl_profile_output; _dl_start_profile;
|
||||||
_dl_loaded; _dl_main_searchlist;
|
_dl_loaded; _dl_main_searchlist; __fpu_control;
|
||||||
|
|
||||||
# functions used in other libraries
|
# functions used in other libraries
|
||||||
_dl_mcount; _dl_mcount_wrapper; _dl_mcount_wrapper_check; _dl_unload_cache;
|
_dl_mcount; _dl_mcount_wrapper; _dl_mcount_wrapper_check; _dl_unload_cache;
|
||||||
|
@ -777,6 +777,10 @@ typedef struct
|
|||||||
#define AT_HWCAP 16 /* Machine dependent hints about
|
#define AT_HWCAP 16 /* Machine dependent hints about
|
||||||
processor capabilities. */
|
processor capabilities. */
|
||||||
|
|
||||||
|
/* This entry gives some information about the FPU initialization
|
||||||
|
performed by the kernel. */
|
||||||
|
#define AT_FPUCW 17 /* Used FPU control word. */
|
||||||
|
|
||||||
|
|
||||||
/* Note section contents. Each entry in the note section begins with
|
/* Note section contents. Each entry in the note section begins with
|
||||||
a header of a fixed form. */
|
a header of a fixed form. */
|
||||||
|
@ -29,7 +29,7 @@ headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
|
|||||||
distribute := math_private.h machine/asm.h machine/endian.h
|
distribute := math_private.h machine/asm.h machine/endian.h
|
||||||
|
|
||||||
# FPU support code.
|
# FPU support code.
|
||||||
aux := fpu_control setfpucw
|
aux := setfpucw
|
||||||
|
|
||||||
# Build the -lm library.
|
# Build the -lm library.
|
||||||
|
|
||||||
|
@ -219,5 +219,21 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fputs ("Test 6:\n", stdout);
|
||||||
|
{
|
||||||
|
char *p = (char *) -1;
|
||||||
|
int res;
|
||||||
|
|
||||||
|
sprintf (buf, "%p", NULL);
|
||||||
|
res = sscanf (buf, "%p", &p);
|
||||||
|
printf ("sscanf (\"%s\", \"%%p\", &p) = %d, p == %p\n", buf, res, p);
|
||||||
|
|
||||||
|
if (res != 1 || p != NULL)
|
||||||
|
{
|
||||||
|
fputs ("test failed!\n", stdout);
|
||||||
|
result = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exit (result);
|
exit (result);
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <elf/ldsodefs.h>
|
#include <elf/ldsodefs.h>
|
||||||
#include <stdio-common/_itoa.h>
|
#include <stdio-common/_itoa.h>
|
||||||
|
#include <fpu_control.h>
|
||||||
|
|
||||||
#include <entry.h>
|
#include <entry.h>
|
||||||
#include <dl-machine.h>
|
#include <dl-machine.h>
|
||||||
@ -126,6 +127,9 @@ _dl_sysdep_start (void **start_argptr,
|
|||||||
case AT_HWCAP:
|
case AT_HWCAP:
|
||||||
_dl_hwcap = av->a_un.a_val;
|
_dl_hwcap = av->a_un.a_val;
|
||||||
break;
|
break;
|
||||||
|
case AT_FPUCW:
|
||||||
|
__fpu_control = av->a_un.a_val;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linux doesn't provide us with any of these values on the stack
|
/* Linux doesn't provide us with any of these values on the stack
|
||||||
@ -249,6 +253,12 @@ _dl_show_auxv (void)
|
|||||||
16, 0),
|
16, 0),
|
||||||
"\n", NULL);
|
"\n", NULL);
|
||||||
break;
|
break;
|
||||||
|
case AT_FPUCW:
|
||||||
|
_dl_sysdep_message ("AT_FPUCW: ",
|
||||||
|
_itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
|
||||||
|
10, 0),
|
||||||
|
"\n", NULL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,8 +60,10 @@ init (int argc, char **argv, char **envp)
|
|||||||
the executable format. */
|
the executable format. */
|
||||||
__personality (PER_LINUX);
|
__personality (PER_LINUX);
|
||||||
|
|
||||||
/* Set the FPU control word to the proper default value. */
|
/* Set the FPU control word to the proper default value if the
|
||||||
__setfpucw (__fpu_control);
|
kernel would use a different value. */
|
||||||
|
if (__fpu_control != _FPU_DEFAULT)
|
||||||
|
__setfpucw (__fpu_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the command-line arguments. */
|
/* Save the command-line arguments. */
|
||||||
|
Reference in New Issue
Block a user