From 9bd646022380b5eef343c61f8a8274135540db09 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 May 2002 23:35:59 +0000 Subject: Update. 2002-05-30 Ulrich Drepper * sysdeps/unix/sysv/linux/Makefile [$(subdir)==misc] (sysdep_routines): Add readahead. * sysdeps/unix/sysv/linux/readahead.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Add sendfile64 syscall. * sysdeps/unix/sysv/linux/Versions: Export readahead and sendfile64. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add readahead syscall. Add sendfile64 alias to sendfile syscall. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/syscalls.list: Add s_readahead syscall. * sysdeps/unix/sysv/linux/i386/sysdep.h: Use __i686.get_pc_thunk.XX special section for PIC register loading. * sysdeps/unix/sysv/linux/i386/i686/sysdep.h: Likewise. * config.h.in: Define HAVE_HIDDEN. * configure.in: Also define HAVE_HIDDEN if HAVE_PROTECTED is defined. * elf/elf.h: Correct Alpha TLS relocations according to last spec. --- ChangeLog | 24 ++++ configure | 124 +++++++++++---------- configure.in | 1 + elf/elf.h | 30 +++-- iconvdata/tst-tables.sh | 1 + sysdeps/unix/sysv/linux/Makefile | 3 +- sysdeps/unix/sysv/linux/Versions | 6 + sysdeps/unix/sysv/linux/alpha/syscalls.list | 2 + sysdeps/unix/sysv/linux/i386/i686/sysdep.h | 52 +++++++-- sysdeps/unix/sysv/linux/i386/sysdep.h | 42 ++++++- sysdeps/unix/sysv/linux/ia64/syscalls.list | 2 + sysdeps/unix/sysv/linux/powerpc/syscalls.list | 1 + sysdeps/unix/sysv/linux/readahead.c | 51 +++++++++ .../unix/sysv/linux/sparc/sparc64/syscalls.list | 2 + sysdeps/unix/sysv/linux/syscalls.list | 1 + sysdeps/unix/sysv/linux/x86_64/syscalls.list | 2 + 16 files changed, 255 insertions(+), 89 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/readahead.c diff --git a/ChangeLog b/ChangeLog index 105b94aac6..b98fae896c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2002-05-30 Ulrich Drepper + + * sysdeps/unix/sysv/linux/Makefile [$(subdir)==misc] (sysdep_routines): + Add readahead. + * sysdeps/unix/sysv/linux/readahead.c: New file. + * sysdeps/unix/sysv/linux/syscalls.list: Add sendfile64 syscall. + * sysdeps/unix/sysv/linux/Versions: Export readahead and sendfile64. + * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add readahead syscall. + Add sendfile64 alias to sendfile syscall. + * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. + * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. + * sysdeps/unix/sysv/linux/powerpc/syscalls.list: Add s_readahead + syscall. + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Use __i686.get_pc_thunk.XX + special section for PIC register loading. + * sysdeps/unix/sysv/linux/i386/i686/sysdep.h: Likewise. + + * config.h.in: Define HAVE_HIDDEN. + * configure.in: Also define HAVE_HIDDEN if HAVE_PROTECTED is defined. + + * elf/elf.h: Correct Alpha TLS relocations according to last spec. + 2002-05-28 Roland McGrath * sysdeps/mach/alpha/setfpucw.c: New file. diff --git a/configure b/configure index 27f2e23969..468b79cd34 100755 --- a/configure +++ b/configure @@ -2786,10 +2786,14 @@ echo "$ac_t""$libc_cv_asm_protected_directive" 1>&6 #define HAVE_PROTECTED 1 EOF + cat >> confdefs.h <<\EOF +#define HAVE_HIDDEN 1 +EOF + if test $libc_cv_asm_protected_directive = yes; then echo $ac_n "checking whether __attribute__((visibility())) is supported""... $ac_c" 1>&6 -echo "configure:2793: checking whether __attribute__((visibility())) is supported" >&5 +echo "configure:2797: checking whether __attribute__((visibility())) is supported" >&5 if eval "test \"`echo '$''{'libc_cv_visibility_attribute'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2820,7 +2824,7 @@ EOF if test $libc_cv_visibility_attribute = yes -a $gnu_ld = yes; then echo $ac_n "checking whether to put _rtld_local into .sdata section""... $ac_c" 1>&6 -echo "configure:2824: checking whether to put _rtld_local into .sdata section" >&5 +echo "configure:2828: checking whether to put _rtld_local into .sdata section" >&5 if eval "test \"`echo '$''{'libc_cv_have_sdata_section'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2844,7 +2848,7 @@ EOF fi echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 -echo "configure:2848: checking for .preinit_array/.init_array/.fini_array support" >&5 +echo "configure:2852: checking for .preinit_array/.init_array/.fini_array support" >&5 if eval "test \"`echo '$''{'libc_cv_initfinit_array'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2855,7 +2859,7 @@ int foo (void) { return 1; } int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; EOF if { ac_try='${CC-cc} -o conftest conftest.c - -static -nostartfiles -nostdlib 1>&5'; { (eval echo configure:2859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } + -static -nostartfiles -nostdlib 1>&5'; { (eval echo configure:2863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then libc_cv_initfinit_array=yes @@ -2878,7 +2882,7 @@ EOF fi echo $ac_n "checking for -z nodelete option""... $ac_c" 1>&6 -echo "configure:2882: checking for -z nodelete option" >&5 +echo "configure:2886: checking for -z nodelete option" >&5 if eval "test \"`echo '$''{'libc_cv_z_nodelete'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2887,7 +2891,7 @@ int _start (void) { return 42; } EOF if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -nostartfiles -nostdlib - -Wl,--enable-new-dtags,-z,nodelete 1>&5'; { (eval echo configure:2891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } + -Wl,--enable-new-dtags,-z,nodelete 1>&5'; { (eval echo configure:2895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then libc_cv_z_nodelete=yes else @@ -2900,7 +2904,7 @@ echo "$ac_t""$libc_cv_z_nodelete" 1>&6 echo $ac_n "checking for -z nodlopen option""... $ac_c" 1>&6 -echo "configure:2904: checking for -z nodlopen option" >&5 +echo "configure:2908: checking for -z nodlopen option" >&5 if eval "test \"`echo '$''{'libc_cv_z_nodlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2909,7 +2913,7 @@ int _start (void) { return 42; } EOF if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -nostartfiles -nostdlib - -Wl,--enable-new-dtags,-z,nodlopen 1>&5'; { (eval echo configure:2913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } + -Wl,--enable-new-dtags,-z,nodlopen 1>&5'; { (eval echo configure:2917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then libc_cv_z_nodlopen=yes else @@ -2922,7 +2926,7 @@ echo "$ac_t""$libc_cv_z_nodlopen" 1>&6 echo $ac_n "checking for -z initfirst option""... $ac_c" 1>&6 -echo "configure:2926: checking for -z initfirst option" >&5 +echo "configure:2930: checking for -z initfirst option" >&5 if eval "test \"`echo '$''{'libc_cv_z_initfirst'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2931,7 +2935,7 @@ int _start (void) { return 42; } EOF if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -nostartfiles -nostdlib - -Wl,--enable-new-dtags,-z,initfirst 1>&5'; { (eval echo configure:2935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } + -Wl,--enable-new-dtags,-z,initfirst 1>&5'; { (eval echo configure:2939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then libc_cv_z_initfirst=yes else @@ -2944,14 +2948,14 @@ echo "$ac_t""$libc_cv_z_initfirst" 1>&6 echo $ac_n "checking for -Bgroup option""... $ac_c" 1>&6 -echo "configure:2948: checking for -Bgroup option" >&5 +echo "configure:2952: checking for -Bgroup option" >&5 if eval "test \"`echo '$''{'libc_cv_Bgroup'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } + if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -Wl,-Bgroup -nostdlib 1>&5'; { (eval echo configure:2959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then libc_cv_Bgroup=yes else @@ -2964,7 +2968,7 @@ echo "$ac_t""$libc_cv_Bgroup" 1>&6 echo $ac_n "checking for -z combreloc""... $ac_c" 1>&6 -echo "configure:2968: checking for -z combreloc" >&5 +echo "configure:2972: checking for -z combreloc" >&5 if eval "test \"`echo '$''{'libc_cv_z_combreloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2975,7 +2979,7 @@ int foo (void) { return bar (mumble); } EOF if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -nostdlib -nostartfiles - -Wl,-z,combreloc 1>&5'; { (eval echo configure:2979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } + -Wl,-z,combreloc 1>&5'; { (eval echo configure:2983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then libc_cv_z_combreloc=yes @@ -3000,12 +3004,12 @@ fi if test $elf != yes; then echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6 -echo "configure:3004: checking for .init and .fini sections" >&5 +echo "configure:3008: checking for .init and .fini sections" >&5 if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_have_initfini=yes else @@ -3037,7 +3041,7 @@ fi if test $elf = yes -a $gnu_ld = yes; then echo $ac_n "checking whether cc puts quotes around section names""... $ac_c" 1>&6 -echo "configure:3041: checking whether cc puts quotes around section names" >&5 +echo "configure:3045: checking whether cc puts quotes around section names" >&5 if eval "test \"`echo '$''{'libc_cv_have_section_quotes'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3074,19 +3078,19 @@ if test $elf = yes; then else if test $ac_cv_prog_cc_works = yes; then echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6 -echo "configure:3078: checking for _ prefix on C symbol names" >&5 +echo "configure:3082: checking for _ prefix on C symbol names" >&5 if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libc_cv_asm_underscores=yes else @@ -3101,17 +3105,17 @@ fi echo "$ac_t""$libc_cv_asm_underscores" 1>&6 else echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6 -echo "configure:3105: checking for _ prefix on C symbol names" >&5 +echo "configure:3109: checking for _ prefix on C symbol names" >&5 if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if grep _underscore_test conftest* >/dev/null; then rm -f conftest* libc_cv_asm_underscores=yes @@ -3143,7 +3147,7 @@ if test $elf = yes; then fi echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6 -echo "configure:3147: checking for assembler .weak directive" >&5 +echo "configure:3151: checking for assembler .weak directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3166,7 +3170,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6 if test $libc_cv_asm_weak_directive = no; then echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6 -echo "configure:3170: checking for assembler .weakext directive" >&5 +echo "configure:3174: checking for assembler .weakext directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3213,14 +3217,14 @@ EOF ;; hppa*linux*) echo $ac_n "checking for assembler line separator""... $ac_c" 1>&6 -echo "configure:3217: checking for assembler line separator" >&5 +echo "configure:3221: checking for assembler line separator" >&5 if eval "test \"`echo '$''{'libc_cv_asm_line_sep'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.s <&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:3228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_line_sep='!' else if test -z "$enable_hacker_mode"; then @@ -3242,7 +3246,7 @@ EOF esac echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6 -echo "configure:3246: checking for ld --no-whole-archive" >&5 +echo "configure:3250: checking for ld --no-whole-archive" >&5 if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3253,7 +3257,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest conftest.c 1>&5'; { (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c 1>&5'; { (eval echo configure:3261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_ld_no_whole_archive=yes else libc_cv_ld_no_whole_archive=no @@ -3267,7 +3271,7 @@ if test $libc_cv_ld_no_whole_archive = yes; then fi echo $ac_n "checking for gcc -fexceptions""... $ac_c" 1>&6 -echo "configure:3271: checking for gcc -fexceptions" >&5 +echo "configure:3275: checking for gcc -fexceptions" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_exceptions'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3278,7 +3282,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -fexceptions - -o conftest conftest.c 1>&5'; { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c 1>&5'; { (eval echo configure:3286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_exceptions=yes else libc_cv_gcc_exceptions=no @@ -3293,14 +3297,14 @@ fi if test "$base_machine" = alpha ; then echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6 -echo "configure:3297: checking for function ..ng prefix" >&5 +echo "configure:3301: checking for function ..ng prefix" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<\EOF foo () { } EOF -if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:3304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; +if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:3308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_alpha_ng_prefix=yes else @@ -3327,19 +3331,19 @@ if test "$host_cpu" = powerpc ; then # Check for a bug present in at least versions 2.8.x of GCC # and versions 1.0.x of EGCS. echo $ac_n "checking whether clobbering cr0 causes problems""... $ac_c" 1>&6 -echo "configure:3331: checking whether clobbering cr0 causes problems" >&5 +echo "configure:3335: checking whether clobbering cr0 causes problems" >&5 if eval "test \"`echo '$''{'libc_cv_c_asmcr0_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_c_asmcr0_bug='no' else @@ -3361,12 +3365,12 @@ fi fi echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6 -echo "configure:3365: checking for DWARF2 unwind info support" >&5 +echo "configure:3369: checking for DWARF2 unwind info support" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_dwarf2_unwind_info=static else libc_cv_gcc_dwarf2_unwind_info=no fi if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame_info -nostdlib -nostartfiles - -o conftest conftest.c -lgcc -lgcc_eh >&5'; { (eval echo configure:3404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc -lgcc_eh >&5'; { (eval echo configure:3408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then if ${CC-cc} $CFLAGS -DCHECK__register_frame_info -nostdlib -nostartfiles \ -o conftest conftest.c -lgcc -lgcc_eh -v 2>&1 >/dev/null \ | grep -q -- --eh-frame-hdr; then @@ -3414,7 +3418,7 @@ fi if test $libc_cv_gcc_dwarf2_unwind_info = no; then if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame -nostdlib -nostartfiles - -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_dwarf2_unwind_info=yes else libc_cv_gcc_dwarf2_unwind_info=no @@ -3444,12 +3448,12 @@ EOF esac echo $ac_n "checking for __builtin_expect""... $ac_c" 1>&6 -echo "configure:3448: checking for __builtin_expect" >&5 +echo "configure:3452: checking for __builtin_expect" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_builtin_expect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_builtin_expect=yes else libc_cv_gcc_builtin_expect=no @@ -3474,7 +3478,7 @@ EOF fi echo $ac_n "checking for __builtin_memset""... $ac_c" 1>&6 -echo "configure:3478: checking for __builtin_memset" >&5 +echo "configure:3482: checking for __builtin_memset" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_builtin_memset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3484,7 +3488,7 @@ void zero (void *x) __builtin_memset (x, 0, 1000); } EOF -if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null'; { (eval echo configure:3488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; +if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null'; { (eval echo configure:3492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_builtin_memset=no else @@ -3502,12 +3506,12 @@ EOF fi echo $ac_n "checking for local label subtraction""... $ac_c" 1>&6 -echo "configure:3506: checking for local label subtraction" >&5 +echo "configure:3510: checking for local label subtraction" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_subtract_local_labels'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_subtract_local_labels=yes else libc_cv_gcc_subtract_local_labels=no @@ -3537,7 +3541,7 @@ EOF fi echo $ac_n "checking for libgd""... $ac_c" 1>&6 -echo "configure:3541: checking for libgd" >&5 +echo "configure:3545: checking for libgd" >&5 if test "$with_gd" != "no"; then old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $libgd_include" @@ -3546,14 +3550,14 @@ if test "$with_gd" != "no"; then old_LIBS="$LIBS" LIBS="$LIBS -lgd -lpng -lz -lm" cat > conftest.$ac_ext < int main() { gdImagePng (0, 0) ; return 0; } EOF -if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBGD=yes else @@ -3573,7 +3577,7 @@ echo "$ac_t""$LIBGD" 1>&6 echo $ac_n "checking size of long double""... $ac_c" 1>&6 -echo "configure:3577: checking size of long double" >&5 +echo "configure:3581: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3581,7 +3585,7 @@ else ac_cv_sizeof_long_double=0 else cat > conftest.$ac_ext < int main() @@ -3592,7 +3596,7 @@ int main() return(0); } EOF -if { (eval echo configure:3596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_double=`cat conftestval` else @@ -3670,7 +3674,7 @@ if test "$uname" = "sysdeps/generic"; then fi echo $ac_n "checking OS release for uname""... $ac_c" 1>&6 -echo "configure:3674: checking OS release for uname" >&5 +echo "configure:3678: checking OS release for uname" >&5 if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3692,7 +3696,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6 uname_release="$libc_cv_uname_release" echo $ac_n "checking OS version for uname""... $ac_c" 1>&6 -echo "configure:3696: checking OS version for uname" >&5 +echo "configure:3700: checking OS version for uname" >&5 if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3721,7 +3725,7 @@ EOF # Test for old glibc 2.0.x headers so that they can be removed properly # Search only in includedir. echo $ac_n "checking for old glibc 2.0.x headers""... $ac_c" 1>&6 -echo "configure:3725: checking for old glibc 2.0.x headers" >&5 +echo "configure:3729: checking for old glibc 2.0.x headers" >&5 if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h" then old_glibc_headers=yes @@ -3782,7 +3786,7 @@ if test $shared = default; then fi echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6 -echo "configure:3786: checking whether -fPIC is default" >&5 +echo "configure:3790: checking whether -fPIC is default" >&5 if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index f763792750..61a13cd147 100644 --- a/configure.in +++ b/configure.in @@ -988,6 +988,7 @@ EOF rm -f conftest*]) AC_SUBST(libc_cv_asm_protected_directive) AC_DEFINE(HAVE_PROTECTED) + AC_DEFINE(HAVE_HIDDEN) if test $libc_cv_asm_protected_directive = yes; then AC_CACHE_CHECK(whether __attribute__((visibility())) is supported, diff --git a/elf/elf.h b/elf/elf.h index 4a11a72cc4..e7ac615d00 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -1795,23 +1795,19 @@ typedef Elf32_Addr Elf32_Conflict; #define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */ #define R_ALPHA_RELATIVE 27 /* Adjust by program base */ #define R_ALPHA_TLS_GD_HI 28 -#define R_ALPHA_TLS_GD_LO 29 -#define R_ALPHA_TLS_GD_16 30 -#define R_ALPHA_TLS_LDM_HI 31 -#define R_ALPHA_TLS_LDM_LO 32 -#define R_ALPHA_TLS_LDM_16 33 -#define R_ALPHA_TLS_LDO_HI 34 -#define R_ALPHA_TLS_LDO_LO 35 -#define R_ALPHA_TLS_LDO_16 36 -#define R_ALPHA_TLS_IE_HI 37 -#define R_ALPHA_TLS_IE_LO 38 -#define R_ALPHA_TLS_IE_16 39 -#define R_ALPHA_TLS_LE_HI 40 -#define R_ALPHA_TLS_LE_LO 41 -#define R_ALPHA_TLS_LE_16 42 -#define R_ALPHA_DTPMOD32 43 -#define R_ALPHA_DTPOFF32 44 -#define R_ALPHA_TPOFF32 45 +#define R_ALPHA_TLSGD 29 +#define R_ALPHA_TLS_LDM 30 +#define R_ALPHA_DTPMOD64 31 +#define R_ALPHA_GOTDTPREL 32 +#define R_ALPHA_DTPREL64 33 +#define R_ALPHA_DTPRELHI 34 +#define R_ALPHA_DTPRELLO 35 +#define R_ALPHA_DTPREL16 36 +#define R_ALPHA_GOTTPREL 37 +#define R_ALPHA_TPREL64 38 +#define R_ALPHA_TPRELHI 39 +#define R_ALPHA_TPRELLO 40 +#define R_ALPHA_TPREL16 41 /* Keep this the last entry. */ #define R_ALPHA_NUM 46 diff --git a/iconvdata/tst-tables.sh b/iconvdata/tst-tables.sh index 6072fe1fa0..a2b445a386 100755 --- a/iconvdata/tst-tables.sh +++ b/iconvdata/tst-tables.sh @@ -230,6 +230,7 @@ cat <, 1998. @@ -32,11 +32,30 @@ /* Store (- %eax) into errno through the GOT. */ # ifdef _LIBC_REENTRANT -# define SYSCALL_ERROR_HANDLER \ -1:movl (%esp),%ebx; \ + +# ifndef HAVE_HIDDEN +# define SETUP_PIC_REG \ + call 1f; \ + .subsection 1; \ +1:movl (%esp), %ebx; \ + ret; \ + .previous +# else +# define SETUP_PIC_REG \ + .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits; \ + .globl __i686.get_pc_thunk.bx; \ + .hidden __i686.get_pc_thunk.bx; \ + .type __i686.get_pc_thunk.bx,@function; \ +__i686.get_pc_thunk.bx: \ + movl (%esp), %ebx; \ ret; \ + .previous; \ + call __i686.get_pc_thunk.bx +# endif + +# define SYSCALL_ERROR_HANDLER \ 0:pushl %ebx; \ - call 1b; \ + SETUP_PIC_REG; \ addl $_GLOBAL_OFFSET_TABLE_, %ebx; \ xorl %edx, %edx; \ subl %eax, %edx; \ @@ -52,10 +71,29 @@ /* A quick note: it is assumed that the call to `__errno_location' does not modify the stack! */ # else -# define SYSCALL_ERROR_HANDLER \ -1:movl (%esp),%ecx; \ + +# ifndef HAVE_HIDDEN +# define SETUP_PIC_REG \ + call 1f; \ + .subsection 1; \ +1:movl (%esp), %ecx; \ + ret; \ + .previous +# else +# define SETUP_PIC_REG \ + .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits; \ + .globl __i686.get_pc_thunk.cx; \ + .hidden __i686.get_pc_thunk.cx; \ + .type __i686.get_pc_thunk.cx,@function; \ +__i686.get_pc_thunk.cx: \ + movl (%esp), %ecx; \ ret; \ -0:call 1b; \ + .previous; \ + call __i686.get_pc_thunk.cx +# endif + +# define SYSCALL_ERROR_HANDLER \ +0:SETUP_PIC_REG; \ addl $_GLOBAL_OFFSET_TABLE_, %ecx; \ xorl %edx, %edx; \ subl %eax, %edx; \ diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 2cc39d69cd..730c4dfdf9 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -76,13 +76,30 @@ #else /* Store (- %eax) into errno through the GOT. */ #ifdef _LIBC_REENTRANT -#define SYSCALL_ERROR_HANDLER \ -0:pushl %ebx; \ + +# ifndef HAVE_HIDDEN +# define SETUP_PIC_REG \ call 1f; \ .subsection 1; \ 1:movl (%esp), %ebx; \ + ret; \ + .previous +# else +# define SETUP_PIC_REG \ + .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits; \ + .globl __i686.get_pc_thunk.bx; \ + .hidden __i686.get_pc_thunk.bx; \ + .type __i686.get_pc_thunk.bx,@function; \ +__i686.get_pc_thunk.bx: \ + movl (%esp), %ebx; \ ret; \ .previous; \ + call __i686.get_pc_thunk.bx +# endif + +#define SYSCALL_ERROR_HANDLER \ +0:pushl %ebx; \ + SETUP_PIC_REG; \ addl $_GLOBAL_OFFSET_TABLE_, %ebx; \ xorl %edx, %edx; \ subl %eax, %edx; \ @@ -98,12 +115,29 @@ /* A quick note: it is assumed that the call to `__errno_location' does not modify the stack! */ #else -#define SYSCALL_ERROR_HANDLER \ -0:call 1f; \ + +# ifndef HAVE_HIDDEN +# define SETUP_PIC_REG \ + call 1f; \ .subsection 1; \ 1:movl (%esp), %ecx; \ + ret; \ + .previous +# else +# define SETUP_PIC_REG \ + .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits; \ + .globl __i686.get_pc_thunk.cx; \ + .hidden __i686.get_pc_thunk.cx; \ + .type __i686.get_pc_thunk.cx,@function; \ +__i686.get_pc_thunk.cx: \ + movl (%esp), %ecx; \ ret; \ .previous; \ + call __i686.get_pc_thunk.cx +# endif + +#define SYSCALL_ERROR_HANDLER \ +0:define SETUP_PIC_REG; \ addl $_GLOBAL_OFFSET_TABLE_, %ecx; \ xorl %edx, %edx; \ subl %eax, %edx; \ diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list index 15a93df618..6463a6ffaa 100644 --- a/sysdeps/unix/sysv/linux/ia64/syscalls.list +++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list @@ -15,6 +15,8 @@ ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 __ftruncate64 truncate - truncate 2 truncate truncate64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit setrlimit64 +readahead EXTRA readahead 3 __readahead readahead +sendfile EXTRA sendfile i:iipi sendfile sendfile64 # semaphore and shm system calls msgctl - msgctl i:iip __msgctl msgctl diff --git a/sysdeps/unix/sysv/linux/powerpc/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/syscalls.list index 7532b9c8fe..434a9a1f7a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/syscalls.list +++ b/sysdeps/unix/sysv/linux/powerpc/syscalls.list @@ -4,6 +4,7 @@ s_ioctl ioctl ioctl i:iiI __syscall_ioctl s_ipc msgget ipc i:iiiip __syscall_ipc s_llseek llseek _llseek i:iiipi __syscall__llseek +s_readahead readahead readahead i:iiii __syscall_readahead s_chown chown chown i:sii __syscall_chown s_execve execve execve i:spp __syscall_execve rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction diff --git a/sysdeps/unix/sysv/linux/readahead.c b/sysdeps/unix/sysv/linux/readahead.c new file mode 100644 index 0000000000..33ea7315d5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/readahead.c @@ -0,0 +1,51 @@ +/* Provide kernel hint to read ahead. + Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +#include +#include + + +#ifdef __NR_readahead + +extern int __syscall_readahead (int fd, off_t offset_hi, off_t offset_lo, + size_t count); + + +ssize_t +__readahead (int fd, loff_t offset, size_t count) +{ + return INLINE_SYSCALL (readahead, 4, fd, (off_t) (offset >> 32), + (off_t) (offset & 0xffffffff), count); +} +#else +ssize_t +__readahead (int fd, loff_t offset, size_t count) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (readahead) + +# include +#endif + +weak_alias (__readahead, readahead) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list index ab93d2fce3..6521c25120 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list @@ -11,6 +11,8 @@ setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 truncate - truncate 2 truncate truncate64 mmap - mmap 6 __mmap mmap __mmap64 mmap64 +readahead EXTRA readahead 3 __readahead readahead +sendfile EXTRA sendfile i:iipi sendfile sendfile64 # Override select.S in parent directory: select - select 5 __select select diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 205699d94d..c3388b28bd 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -49,6 +49,7 @@ sched_sets - sched_setscheduler i:iip __sched_setscheduler sched_setscheduler sched_yield - sched_yield i: __sched_yield sched_yield select - _newselect i:iPPPP __select select sendfile EXTRA sendfile i:iipi sendfile +sendfile64 EXTRA sendfile64 i:iipi sendfile64 setfsgid EXTRA setfsgid i:i setfsgid setfsuid EXTRA setfsuid i:i setfsuid setpgid - setpgid i:ii __setpgid setpgid diff --git a/sysdeps/unix/sysv/linux/x86_64/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/syscalls.list index dcb1a090d7..294226726f 100644 --- a/sysdeps/unix/sysv/linux/x86_64/syscalls.list +++ b/sysdeps/unix/sysv/linux/x86_64/syscalls.list @@ -14,6 +14,8 @@ getrlimit - getrlimit i:ip __getrlimit getrlimit getrlimit64 setrlimit - setrlimit i:ip __setrlimit setrlimit64 setrlimit ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 truncate - truncate i:si truncate truncate64 +readahead EXTRA readahead i:iipi __readahead readahead +sendfile EXTRA sendfile i:iip sendfile sendfile64 # semaphore and shm system calls msgctl - msgctl i:iip __msgctl msgctl -- cgit 1.4.1