about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog41
-rw-r--r--include/libc-symbols.h7
-rw-r--r--io/ftw.c3
-rw-r--r--libio/iofopncook.c2
-rw-r--r--libio/oldfileops.c17
-rw-r--r--libio/oldiofclose.c3
-rw-r--r--libio/oldiofdopen.c4
-rw-r--r--libio/oldiofgetpos.c3
-rw-r--r--libio/oldiofgetpos64.c3
-rw-r--r--libio/oldiofopen.c4
-rw-r--r--libio/oldiofsetpos.c3
-rw-r--r--libio/oldiofsetpos64.c3
-rw-r--r--libio/oldiopopen.c3
-rw-r--r--libio/oldpclose.c3
-rw-r--r--libio/oldtmpfile.c3
-rw-r--r--nptl/forward.c30
-rw-r--r--nss/getXXbyYY_r.c1
-rw-r--r--nss/getXXent_r.c3
-rw-r--r--stdlib/canonicalize.c1
-rw-r--r--stdlib/old_atexit.c2
-rw-r--r--sysdeps/generic/glob.c5
-rw-r--r--sysdeps/posix/posix_fallocate64.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/alphasort64.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/chown.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/glob64.c1
-rw-r--r--sysdeps/unix/sysv/linux/i386/msgctl.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/posix_fadvise64.S5
-rw-r--r--sysdeps/unix/sysv/linux/i386/readdir64.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/readdir64_r.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/scandir64.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/semctl.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/shmctl.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/i386/versionsort64.c5
35 files changed, 145 insertions, 45 deletions
diff --git a/ChangeLog b/ChangeLog
index c3b139cb7e..26f8bf89b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+2004-03-10  Ulrich Drepper  <drepper@redhat.com>
+
+	* include/libc-symbols.h: Define attribute_compat_text_section and
+	attribute_compat_data_section.
+	* io/ftw.c: Mark compat code with attribute_compat_text_section.
+	* libio/iofopncook.c: Likewise.
+	* libio/oldfileops.c: Likewise.
+	* libio/oldiofclose.c: Likewise.
+	* libio/oldiofdopen.c: Likewise.
+	* libio/oldiofgetpos.c: Likewise.
+	* libio/oldiofgetpos64.c: Likewise.
+	* libio/oldiofopen.c: Likewise.
+	* libio/oldiofsetpos.c: Likewise.
+	* libio/oldiofsetpos64.c: Likewise.
+	* libio/oldiopopen.c: Likewise.
+	* libio/oldpclose.c: Likewise.
+	* libio/oldtmpfile.c: Likewise.
+	* nptl/forward.c: Likewise.
+	* nss/getXXbyYY_r.c: Likewise.
+	* nss/getXXent_r.c: Likewise.
+	* posix/tst-vfork1.c: Likewise.
+	* stdlib/canonicalize.c: Likewise.
+	* stdlib/old_atexit.c: Likewise.
+	* sysdeps/generic/glob.c: Likewise.
+	* sysdeps/posix/posix_fallocate64.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/alphasort64.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/chown.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/glob64.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Likewise.
+	* sysdeps/unix/sysv/linux/i386/readdir64.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/readdir64_r.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/scandir64.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/semctl.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/versionsort64.c: Likewise.
+
+	* sysdeps/unix/sysv/linux/i386/syscalls.list: vm86@@GLIBC_2.3.4
+	should be the default symbol. Having none misses the point.
+
 2004-03-09  Ulrich Drepper  <drepper@redhat.com>
 
 	* stdlib/qsort.c (_quicksort): Initialize first stack element [BZ #16].
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 93b5f9d454..4d87b2d4dc 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -759,4 +759,11 @@ for linking")
 /* Get some dirty hacks.  */
 #include <symbol-hacks.h>
 
+/* Move compatibility symbols out of the way by placing them all in a
+   special section.  */
+#define attribute_compat_text_section \
+    __attribute__ ((section (".text.compat")))
+#define attribute_compat_data_section \
+    __attribute__ ((section (".data.compat")))
+
 #endif /* libc-symbols.h */
diff --git a/io/ftw.c b/io/ftw.c
index 20cf694e24..7610851047 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -1,5 +1,5 @@
 /* File tree walker functions.
-   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -784,6 +784,7 @@ versioned_symbol (libc, NFTW_NEW_NAME, NFTW_NAME, GLIBC_2_3_3);
 int NFTW_OLD_NAME (const char *, NFTW_FUNC_T, int, int);
 
 int
+attribute_compat_text_section
 NFTW_OLD_NAME (path, func, descriptors, flags)
      const char *path;
      NFTW_FUNC_T func;
diff --git a/libio/iofopncook.c b/libio/iofopncook.c
index eb5df886f9..321eb67b8d 100644
--- a/libio/iofopncook.c
+++ b/libio/iofopncook.c
@@ -195,6 +195,7 @@ _IO_FILE * _IO_old_fopencookie (void *cookie, const char *mode,
 				_IO_cookie_io_functions_t io_functions);
 
 static _IO_off64_t
+attribute_compat_text_section
 _IO_old_cookie_seek (fp, offset, dir)
      _IO_FILE *fp;
      _IO_off64_t offset;
@@ -237,6 +238,7 @@ static const struct _IO_jump_t _IO_old_cookie_jumps = {
 };
 
 _IO_FILE *
+attribute_compat_text_section
 _IO_old_fopencookie (cookie, mode, io_functions)
      void *cookie;
      const char *mode;
diff --git a/libio/oldfileops.c b/libio/oldfileops.c
index a397a322d3..20413978a0 100644
--- a/libio/oldfileops.c
+++ b/libio/oldfileops.c
@@ -115,6 +115,7 @@ extern int errno;
 
 
 void
+attribute_compat_text_section
 _IO_old_file_init (fp)
      struct _IO_FILE_plus *fp;
 {
@@ -141,6 +142,7 @@ _IO_old_file_init (fp)
 }
 
 int
+attribute_compat_text_section
 _IO_old_file_close_it (fp)
      _IO_FILE *fp;
 {
@@ -168,6 +170,7 @@ _IO_old_file_close_it (fp)
 }
 
 void
+attribute_compat_text_section
 _IO_old_file_finish (fp, dummy)
      _IO_FILE *fp;
      int dummy;
@@ -182,6 +185,7 @@ _IO_old_file_finish (fp, dummy)
 }
 
 _IO_FILE *
+attribute_compat_text_section
 _IO_old_file_fopen (fp, filename, mode)
      _IO_FILE *fp;
      const char *filename;
@@ -231,6 +235,7 @@ _IO_old_file_fopen (fp, filename, mode)
 }
 
 _IO_FILE *
+attribute_compat_text_section
 _IO_old_file_attach (fp, fd)
      _IO_FILE *fp;
      int fd;
@@ -250,6 +255,7 @@ _IO_old_file_attach (fp, fd)
 }
 
 _IO_FILE *
+attribute_compat_text_section
 _IO_old_file_setbuf (fp, p, len)
      _IO_FILE *fp;
      char *p;
@@ -271,6 +277,7 @@ static int old_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
    Then mark FP as having empty buffers. */
 
 int
+attribute_compat_text_section
 _IO_old_do_write (fp, data, to_do)
      _IO_FILE *fp;
      const char *data;
@@ -280,8 +287,8 @@ _IO_old_do_write (fp, data, to_do)
 	 ? 0 : EOF;
 }
 
-static
-int
+static int
+attribute_compat_text_section
 old_do_write (fp, data, to_do)
      _IO_FILE *fp;
      const char *data;
@@ -315,6 +322,7 @@ old_do_write (fp, data, to_do)
 }
 
 int
+attribute_compat_text_section
 _IO_old_file_underflow (fp)
      _IO_FILE *fp;
 {
@@ -379,6 +387,7 @@ _IO_old_file_underflow (fp)
 }
 
 int
+attribute_compat_text_section
 _IO_old_file_overflow (f, ch)
       _IO_FILE *f;
       int ch;
@@ -430,6 +439,7 @@ _IO_old_file_overflow (f, ch)
 }
 
 int
+attribute_compat_text_section
 _IO_old_file_sync (fp)
      _IO_FILE *fp;
 {
@@ -464,6 +474,7 @@ _IO_old_file_sync (fp)
 }
 
 _IO_off64_t
+attribute_compat_text_section
 _IO_old_file_seekoff (fp, offset, dir, mode)
      _IO_FILE *fp;
      _IO_off64_t offset;
@@ -650,6 +661,7 @@ resync:
 }
 
 _IO_ssize_t
+attribute_compat_text_section
 _IO_old_file_write (f, data, n)
      _IO_FILE *f;
      const void *data;
@@ -674,6 +686,7 @@ _IO_old_file_write (f, data, n)
 }
 
 _IO_size_t
+attribute_compat_text_section
 _IO_old_file_xsputn (f, data, n)
      _IO_FILE *f;
      const void *data;
diff --git a/libio/oldiofclose.c b/libio/oldiofclose.c
index 3762279bdc..8dd321b054 100644
--- a/libio/oldiofclose.c
+++ b/libio/oldiofclose.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997-2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997-2002, 2004 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
@@ -35,6 +35,7 @@
 #endif
 
 int
+attribute_compat_text_section
 _IO_old_fclose (fp)
      _IO_FILE *fp;
 {
diff --git a/libio/oldiofdopen.c b/libio/oldiofdopen.c
index b256000c2c..c616b387fa 100644
--- a/libio/oldiofdopen.c
+++ b/libio/oldiofdopen.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,94,97,99,2000,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,97,99,2000,2002,2003,2004
+   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
@@ -40,6 +41,7 @@
 #endif
 
 _IO_FILE *
+attribute_compat_text_section
 _IO_old_fdopen (fd, mode)
      int fd;
      const char *mode;
diff --git a/libio/oldiofgetpos.c b/libio/oldiofgetpos.c
index b00a5203e5..fbac21bdd4 100644
--- a/libio/oldiofgetpos.c
+++ b/libio/oldiofgetpos.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
+/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -33,6 +33,7 @@
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 
 int
+attribute_compat_text_section
 _IO_old_fgetpos (fp, posp)
      _IO_FILE *fp;
      _IO_fpos_t *posp;
diff --git a/libio/oldiofgetpos64.c b/libio/oldiofgetpos64.c
index b3a4e0e83b..996ad2075b 100644
--- a/libio/oldiofgetpos64.c
+++ b/libio/oldiofgetpos64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
+/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -33,6 +33,7 @@
 #if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)
 
 int
+attribute_compat_text_section
 _IO_old_fgetpos64 (fp, posp)
      _IO_FILE *fp;
      _IO_fpos64_t *posp;
diff --git a/libio/oldiofopen.c b/libio/oldiofopen.c
index 0370c762f6..c761580a78 100644
--- a/libio/oldiofopen.c
+++ b/libio/oldiofopen.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,1997,1999,2000,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1997,1999,2000,2002,2003,2004
+   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
@@ -36,6 +37,7 @@
 
 
 _IO_FILE *
+attribute_compat_text_section
 _IO_old_fopen (filename, mode)
      const char *filename;
      const char *mode;
diff --git a/libio/oldiofsetpos.c b/libio/oldiofsetpos.c
index 23ef565d20..131bd1adb9 100644
--- a/libio/oldiofsetpos.c
+++ b/libio/oldiofsetpos.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003
+/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -32,6 +32,7 @@
 #include <shlib-compat.h>
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 int
+attribute_compat_text_section
 _IO_old_fsetpos (fp, posp)
      _IO_FILE *fp;
      const _IO_fpos_t *posp;
diff --git a/libio/oldiofsetpos64.c b/libio/oldiofsetpos64.c
index 34758599a3..963bc02b6a 100644
--- a/libio/oldiofsetpos64.c
+++ b/libio/oldiofsetpos64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003
+/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -33,6 +33,7 @@
 #if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)
 
 int
+attribute_compat_text_section
 _IO_old_fsetpos64 (fp, posp)
      _IO_FILE *fp;
      const _IO_fpos64_t *posp;
diff --git a/libio/oldiopopen.c b/libio/oldiopopen.c
index a7530c82db..a06769dbb4 100644
--- a/libio/oldiopopen.c
+++ b/libio/oldiopopen.c
@@ -120,6 +120,7 @@ unlock (void *not_used)
 #endif
 
 _IO_FILE *
+attribute_compat_text_section
 _IO_old_proc_open (fp, command, mode)
      _IO_FILE *fp;
      const char *command;
@@ -202,6 +203,7 @@ _IO_old_proc_open (fp, command, mode)
 }
 
 _IO_FILE *
+attribute_compat_text_section
 _IO_old_popen (command, mode)
      const char *command;
      const char *mode;
@@ -236,6 +238,7 @@ _IO_old_popen (command, mode)
 }
 
 int
+attribute_compat_text_section
 _IO_old_proc_close (fp)
      _IO_FILE *fp;
 {
diff --git a/libio/oldpclose.c b/libio/oldpclose.c
index ecc58bb4c6..cf297b3def 100644
--- a/libio/oldpclose.c
+++ b/libio/oldpclose.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998,2000, 2004 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
@@ -34,6 +34,7 @@
 #include <errno.h>
 
 int
+attribute_compat_text_section
 __old_pclose (fp)
      FILE *fp;
 {
diff --git a/libio/oldtmpfile.c b/libio/oldtmpfile.c
index a277914d26..8631d48c0b 100644
--- a/libio/oldtmpfile.c
+++ b/libio/oldtmpfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1993,1996-2000,2003,2004 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
@@ -29,6 +29,7 @@
    If we couldn't generate a unique filename or the file couldn't
    be opened, NULL is returned.  */
 FILE *
+attribute_compat_text_section
 __old_tmpfile (void)
 {
   char buf[FILENAME_MAX];
diff --git a/nptl/forward.c b/nptl/forward.c
index 407fd092d9..06740d9266 100644
--- a/nptl/forward.c
+++ b/nptl/forward.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -88,7 +88,8 @@ FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0)
 FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0)
 
 #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
-FORWARD (__pthread_cond_broadcast_2_0, (pthread_cond_2_0_t *cond), (cond), 0)
+FORWARD2 (__pthread_cond_broadcast_2_0, int attribute_compat_text_section,
+	  (pthread_cond_2_0_t *cond), (cond), 0)
 compat_symbol (libc, __pthread_cond_broadcast_2_0, pthread_cond_broadcast,
 	       GLIBC_2_0);
 #endif
@@ -97,7 +98,8 @@ versioned_symbol (libc, __pthread_cond_broadcast, pthread_cond_broadcast,
 		  GLIBC_2_3_2);
 
 #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
-FORWARD (__pthread_cond_destroy_2_0, (pthread_cond_2_0_t *cond), (cond), 0)
+FORWARD2 (__pthread_cond_destroy_2_0, int attribute_compat_text_section,
+	  (pthread_cond_2_0_t *cond), (cond), 0)
 compat_symbol (libc, __pthread_cond_destroy_2_0, pthread_cond_destroy,
 	       GLIBC_2_0);
 #endif
@@ -106,9 +108,9 @@ versioned_symbol (libc, __pthread_cond_destroy, pthread_cond_destroy,
 		  GLIBC_2_3_2);
 
 #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
-FORWARD (__pthread_cond_init_2_0,
-	 (pthread_cond_2_0_t *cond, const pthread_condattr_t *cond_attr),
-	 (cond, cond_attr), 0)
+FORWARD2 (__pthread_cond_init_2_0, int attribute_compat_text_section,
+	  (pthread_cond_2_0_t *cond, const pthread_condattr_t *cond_attr),
+	  (cond, cond_attr), 0)
 compat_symbol (libc, __pthread_cond_init_2_0, pthread_cond_init, GLIBC_2_0);
 #endif
 FORWARD (__pthread_cond_init,
@@ -117,7 +119,8 @@ FORWARD (__pthread_cond_init,
 versioned_symbol (libc, __pthread_cond_init, pthread_cond_init, GLIBC_2_3_2);
 
 #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
-FORWARD (__pthread_cond_signal_2_0, (pthread_cond_2_0_t *cond), (cond), 0)
+FORWARD2 (__pthread_cond_signal_2_0, int attribute_compat_text_section,
+	  (pthread_cond_2_0_t *cond), (cond), 0)
 compat_symbol (libc, __pthread_cond_signal_2_0, pthread_cond_signal,
 	       GLIBC_2_0);
 #endif
@@ -126,8 +129,8 @@ versioned_symbol (libc, __pthread_cond_signal, pthread_cond_signal,
 		  GLIBC_2_3_2);
 
 #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
-FORWARD (__pthread_cond_wait_2_0,
-	 (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex), (cond, mutex), 0)
+FORWARD2 (__pthread_cond_wait_2_0, int attribute_compat_text_section,
+	  (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex), (cond, mutex), 0)
 compat_symbol (libc, __pthread_cond_wait_2_0, pthread_cond_wait,
 	       GLIBC_2_0);
 #endif
@@ -137,9 +140,9 @@ versioned_symbol (libc, __pthread_cond_wait, pthread_cond_wait,
 		  GLIBC_2_3_2);
 
 #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2)
-FORWARD (__pthread_cond_timedwait_2_0,
-	 (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex,
-	  const struct timespec *abstime), (cond, mutex, abstime), 0)
+FORWARD2 (__pthread_cond_timedwait_2_0, int attribute_compat_text_section,
+	  (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex,
+	   const struct timespec *abstime), (cond, mutex, abstime), 0)
 compat_symbol (libc, __pthread_cond_timedwait_2_0, pthread_cond_timedwait,
 	       GLIBC_2_0);
 #endif
@@ -188,7 +191,8 @@ FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
 
 #define return /* value is void */
 FORWARD2(__pthread_unwind,
-	 void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute,
+	 void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute
+	 attribute_compat_text_section,
 	 (__pthread_unwind_buf_t *buf), (buf), {
 		       /* We cannot call abort() here.  */
 		       INTERNAL_SYSCALL_DECL (err);
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 65bc8e97b8..999df4198d 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -270,6 +270,7 @@ done:
 #define OLD1(name) __old_##name
 
 int
+attribute_compat_text_section
 OLD (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
 		      size_t buflen, LOOKUP_TYPE **result H_ERRNO_PARM)
 {
diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c
index 8a0155bc3d..db4abaf5d7 100644
--- a/nss/getXXent_r.c
+++ b/nss/getXXent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,97,98,99,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,98,99,2000,2002,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -175,6 +175,7 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
 #define OLD1(name) __old_##name
 
 int
+attribute_compat_text_section
 OLD (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
 			 LOOKUP_TYPE **result H_ERRNO_PARM)
 {
diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c
index 8388316df3..2168bbd90e 100644
--- a/stdlib/canonicalize.c
+++ b/stdlib/canonicalize.c
@@ -219,6 +219,7 @@ versioned_symbol (libc, __realpath, realpath, GLIBC_2_3);
 
 #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3)
 char *
+attribute_compat_text_section
 __old_realpath (const char *name, char *resolved)
 {
   if (resolved == NULL)
diff --git a/stdlib/old_atexit.c b/stdlib/old_atexit.c
index 45f330bec8..44bbd699bd 100644
--- a/stdlib/old_atexit.c
+++ b/stdlib/old_atexit.c
@@ -1,7 +1,7 @@
 #include <shlib-compat.h>
 
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2)
-# define atexit __dyn_atexit
+# define atexit attribute_compat_text_section __dyn_atexit
 # include "atexit.c"
 # undef atexit
 compat_symbol (libc, __dyn_atexit, atexit, GLIBC_2_0);
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index 11d275496b..2a7ca558e8 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2002, 2003, 2004 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
@@ -390,6 +390,9 @@ next_brace_sub (cp, flags)
    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
    Otherwise, `glob' returns zero.  */
 int
+#ifdef GLOB_ATTRIBUTE
+GLOB_ATTRIBUTE
+#endif
 glob (pattern, flags, errfunc, pglob)
      const char *pattern;
      int flags;
diff --git a/sysdeps/posix/posix_fallocate64.c b/sysdeps/posix/posix_fallocate64.c
index e5fb18d549..0eba4161a5 100644
--- a/sysdeps/posix/posix_fallocate64.c
+++ b/sysdeps/posix/posix_fallocate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003, 2004 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
@@ -76,6 +76,7 @@ __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
 #if __WORDSIZE == 32 && SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
 
 int
+attribute_compat_text_section
 __posix_fallocate64_l32 (int fd, off64_t offset, size_t len)
 {
   return __posix_fallocate64_l64 (fd, offset, len);
diff --git a/sysdeps/unix/sysv/linux/i386/alphasort64.c b/sysdeps/unix/sysv/linux/i386/alphasort64.c
index a52d018072..221aedc16b 100644
--- a/sysdeps/unix/sysv/linux/i386/alphasort64.c
+++ b/sysdeps/unix/sysv/linux/i386/alphasort64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997, 1998, 2000, 2004 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
@@ -38,6 +38,7 @@ int
 __old_alphasort64 (const void *a, const void *b);
 
 int
+attribute_compat_text_section
 __old_alphasort64 (const void *a, const void *b)
 {
   return strcoll ((*(const struct __old_dirent64 **) a)->d_name,
diff --git a/sysdeps/unix/sysv/linux/i386/chown.c b/sysdeps/unix/sysv/linux/i386/chown.c
index a838181136..31a6e0f08a 100644
--- a/sysdeps/unix/sysv/linux/i386/chown.c
+++ b/sysdeps/unix/sysv/linux/i386/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998,1999,2000,2002,2003,2004 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
@@ -136,6 +136,7 @@ __chown_is_lchown (const char *file, uid_t owner, gid_t group)
 #elif SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
 /* Compiling for compatibiity.  */
 int
+attribute_compat_text_section
 __chown_is_lchown (const char *file, uid_t owner, gid_t group)
 {
   return __lchown (file, owner, group);
diff --git a/sysdeps/unix/sysv/linux/i386/glob64.c b/sysdeps/unix/sysv/linux/i386/glob64.c
index 3d2eb4bfe5..b83f82b51d 100644
--- a/sysdeps/unix/sysv/linux/i386/glob64.c
+++ b/sysdeps/unix/sysv/linux/i386/glob64.c
@@ -43,6 +43,7 @@ int __old_glob64 (__const char *__pattern, int __flags,
 #define glob(pattern, flags, errfunc, pglob) \
   __old_glob64 (pattern, flags, errfunc, pglob)
 #define glob_in_dir __old_glob_in_dir
+#define GLOB_ATTRIBUTE attribute_compat_text_section
 
 #define GLOB_ONLY_P 1
 
diff --git a/sysdeps/unix/sysv/linux/i386/msgctl.c b/sysdeps/unix/sysv/linux/i386/msgctl.c
index 3e95d85b3a..108da8a987 100644
--- a/sysdeps/unix/sysv/linux/i386/msgctl.c
+++ b/sysdeps/unix/sysv/linux/i386/msgctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2000, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -63,6 +63,7 @@ extern int __libc_missing_32bit_uids;
 
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 int
+attribute_compat_text_section
 __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf)
 {
   return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl,
diff --git a/sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c
index 2fd2aceac9..3947e5988f 100644
--- a/sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c
+++ b/sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995-1999, 2000, 2004 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
@@ -33,6 +33,7 @@ extern int __old_getrlimit64 (enum __rlimit_resource resource,
 /* Put the soft and hard limits for RESOURCE in *RLIMITS.
    Returns 0 if successful, -1 if not (and sets errno).  */
 int
+attribute_compat_text_section
 __old_getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
 {
   struct rlimit rlimits32;
diff --git a/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S b/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S
index b577f2284e..99a3ea536d 100644
--- a/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S
+++ b/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S
@@ -116,7 +116,10 @@ L(overflow):
 END (BP_SYM (__posix_fadvise64_l64))
 
 #ifdef __NR_fadvise64
-PSEUDO_ERRVAL (__posix_fadvise64_l32, fadvise64, 5)
+	.section	.text.compat, "ax"
+ENTRY (__posix_fadvise64_l32)
+	DO_CALL (fadvise64, 5)
+	negl %eax
 	ret
 PSEUDO_END_ERRVAL (__posix_fadvise64_l32)
 #else
diff --git a/sysdeps/unix/sysv/linux/i386/readdir64.c b/sysdeps/unix/sysv/linux/i386/readdir64.c
index a0d858bc85..8d39088691 100644
--- a/sysdeps/unix/sysv/linux/i386/readdir64.c
+++ b/sysdeps/unix/sysv/linux/i386/readdir64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004 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
@@ -34,7 +34,7 @@ versioned_symbol (libc, __readdir64, readdir64, GLIBC_2_2);
 
 #include <sysdeps/unix/sysv/linux/i386/olddirent.h>
 
-#define __READDIR __old_readdir64
+#define __READDIR attribute_compat_text_section __old_readdir64
 #define __GETDENTS __old_getdents64
 #define DIRENT_TYPE struct __old_dirent64
 
diff --git a/sysdeps/unix/sysv/linux/i386/readdir64_r.c b/sysdeps/unix/sysv/linux/i386/readdir64_r.c
index a6f9d44d42..c6da57b75e 100644
--- a/sysdeps/unix/sysv/linux/i386/readdir64_r.c
+++ b/sysdeps/unix/sysv/linux/i386/readdir64_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004 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
@@ -34,7 +34,7 @@ versioned_symbol (libc, __readdir64_r, readdir64_r, GLIBC_2_2);
 
 #include <sysdeps/unix/sysv/linux/i386/olddirent.h>
 
-#define __READDIR_R __old_readdir64_r
+#define __READDIR_R attribute_compat_text_section __old_readdir64_r
 #define __GETDENTS __old_getdents64
 #define DIRENT_TYPE struct __old_dirent64
 
diff --git a/sysdeps/unix/sysv/linux/i386/scandir64.c b/sysdeps/unix/sysv/linux/i386/scandir64.c
index 285909f0dc..690be813b7 100644
--- a/sysdeps/unix/sysv/linux/i386/scandir64.c
+++ b/sysdeps/unix/sysv/linux/i386/scandir64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004 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
@@ -36,7 +36,7 @@ versioned_symbol (libc, __scandir64, scandir64, GLIBC_2_2);
 
 #include <sysdeps/unix/sysv/linux/i386/olddirent.h>
 
-#define SCANDIR __old_scandir64
+#define SCANDIR attribute_compat_text_section __old_scandir64
 #define READDIR __old_readdir64
 #define DIRENT_TYPE struct __old_dirent64
 
diff --git a/sysdeps/unix/sysv/linux/i386/semctl.c b/sysdeps/unix/sysv/linux/i386/semctl.c
index 84edf052b0..14bfac613c 100644
--- a/sysdeps/unix/sysv/linux/i386/semctl.c
+++ b/sysdeps/unix/sysv/linux/i386/semctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1997,1998,2000,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -71,6 +71,7 @@ int __new_semctl (int semid, int semnum, int cmd, ...);
 
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 int
+attribute_compat_text_section
 __old_semctl (int semid, int semnum, int cmd, ...)
 {
   union semun arg;
diff --git a/sysdeps/unix/sysv/linux/i386/shmctl.c b/sysdeps/unix/sysv/linux/i386/shmctl.c
index 8fa6ff0b6b..394d3c01cf 100644
--- a/sysdeps/unix/sysv/linux/i386/shmctl.c
+++ b/sysdeps/unix/sysv/linux/i386/shmctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2000, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -70,6 +70,7 @@ int __new_shmctl (int, int, struct shmid_ds *);
 
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 int
+attribute_compat_text_section
 __old_shmctl (int shmid, int cmd, struct __old_shmid_ds *buf)
 {
   return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl,
diff --git a/sysdeps/unix/sysv/linux/i386/syscalls.list b/sysdeps/unix/sysv/linux/i386/syscalls.list
index ddd81be5be..214397446d 100644
--- a/sysdeps/unix/sysv/linux/i386/syscalls.list
+++ b/sysdeps/unix/sysv/linux/i386/syscalls.list
@@ -2,7 +2,7 @@
 
 modify_ldt	EXTRA	modify_ldt	i:ipi	__modify_ldt	modify_ldt
 vm86old		EXTRA	vm86old		i:p	__vm86old	vm86@GLIBC_2.0
-vm86		-	vm86		i:ip	__vm86		vm86@GLIBC_2.3.4
+vm86		-	vm86		i:ip	__vm86		vm86@@GLIBC_2.3.4
 oldgetrlimit	EXTRA	getrlimit	i:ip	__old_getrlimit	getrlimit@GLIBC_2.0
 oldsetrlimit	EXTRA	setrlimit	i:ip	__old_setrlimit	setrlimit@GLIBC_2.0
 time		-	time		Ei:p	time
diff --git a/sysdeps/unix/sysv/linux/i386/versionsort64.c b/sysdeps/unix/sysv/linux/i386/versionsort64.c
index 7243021ff4..3efce692f7 100644
--- a/sysdeps/unix/sysv/linux/i386/versionsort64.c
+++ b/sysdeps/unix/sysv/linux/i386/versionsort64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997, 1998, 2000, 2004 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
@@ -38,11 +38,12 @@ int
 __old_versionsort64 (const void *a, const void *b);
 
 int
+attribute_compat_text_section
 __old_versionsort64 (const void *a, const void *b)
 {
   return __strverscmp ((*(const struct __old_dirent64 **) a)->d_name,
 		       (*(const struct __old_dirent64 **) b)->d_name);
 }
-                      
+
 compat_symbol (libc, __old_versionsort64, versionsort64, GLIBC_2_1);
 #endif