summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/frv
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-22 19:35:08 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-22 19:35:08 +0000
commitdf31d32b411022d130b078de177cfa40b7bf6cde (patch)
tree0604126022fcad298f377155a756b42e28882177 /libc/sysdeps/linux/frv
parentd98307c5af70386c4480deff87c7c9921d801c7c (diff)
Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA is a useless attempt
Diffstat (limited to 'libc/sysdeps/linux/frv')
-rw-r--r--libc/sysdeps/linux/frv/crtreloc.c9
-rw-r--r--libc/sysdeps/linux/frv/dl-iterate-phdr.c3
-rw-r--r--libc/sysdeps/linux/frv/fstat.c23
-rw-r--r--libc/sysdeps/linux/frv/fstat64.c25
-rw-r--r--libc/sysdeps/linux/frv/lstat.c23
-rw-r--r--libc/sysdeps/linux/frv/lstat64.c25
-rw-r--r--libc/sysdeps/linux/frv/stat.c23
-rw-r--r--libc/sysdeps/linux/frv/stat64.c25
8 files changed, 25 insertions, 131 deletions
diff --git a/libc/sysdeps/linux/frv/crtreloc.c b/libc/sysdeps/linux/frv/crtreloc.c
index de67bc312..1a86728a3 100644
--- a/libc/sysdeps/linux/frv/crtreloc.c
+++ b/libc/sysdeps/linux/frv/crtreloc.c
@@ -26,15 +26,12 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#define _GNU_SOURCE
#include <sys/types.h>
#include <link.h>
/* This file is to be compiled into crt object files, to enable
executables to easily self-relocate. */
-#define hidden __attribute__((__visibility__("hidden")))
-
/* Compute the runtime address of pointer in the range [p,e), and then
map the pointer pointed by it. */
inline static void ***
@@ -65,7 +62,7 @@ reloc_range_indirect (void ***p, void ***e,
/* Call __reloc_range_indirect for the given range except for the last
entry, whose contents are only relocated. It's expected to hold
the GOT value. */
-void* hidden
+void* attribute_hidden
__self_reloc (const struct elf32_fdpic_loadmap *map,
void ***p, void ***e)
{
@@ -96,7 +93,7 @@ reloc_range (void **p, void **e,
/* Remap p, adjust e by the same offset, then map the pointers in the
range determined by them. */
-void hidden
+void attribute_hidden
__reloc_range (const struct elf32_fdpic_loadmap *map,
void **p, void **e)
{
@@ -110,7 +107,7 @@ __reloc_range (const struct elf32_fdpic_loadmap *map,
/* Remap p, adjust e by the same offset, then map pointers referenced
by the (unadjusted) pointers in the range. Return the relocated
value of the last pointer in the range. */
-void* hidden
+void* attribute_hidden
__reloc_range_indirect (const struct elf32_fdpic_loadmap *map,
void ***p, void ***e)
{
diff --git a/libc/sysdeps/linux/frv/dl-iterate-phdr.c b/libc/sysdeps/linux/frv/dl-iterate-phdr.c
index ebb3b9c4a..144e4c145 100644
--- a/libc/sysdeps/linux/frv/dl-iterate-phdr.c
+++ b/libc/sysdeps/linux/frv/dl-iterate-phdr.c
@@ -16,10 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#define _GNU_SOURCE
#include <link.h>
-extern int __attribute__((__weak__))
+extern int weak_function
__dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
size_t size, void *data),
void *data);
diff --git a/libc/sysdeps/linux/frv/fstat.c b/libc/sysdeps/linux/frv/fstat.c
index c1b524b26..a1d343cb8 100644
--- a/libc/sysdeps/linux/frv/fstat.c
+++ b/libc/sysdeps/linux/frv/fstat.c
@@ -9,27 +9,10 @@
* Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
-#define _GNU_SOURCE
-#define _LARGEFILE64_SOURCE
-#include <features.h>
-#undef __OPTIMIZE__
-/* We absolutely do _NOT_ want interfaces silently
- * * * renamed under us or very bad things will happen... */
-#ifdef __USE_FILE_OFFSET64
-# undef __USE_FILE_OFFSET64
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <endian.h>
-
+#include "../common/syscalls.h"
#include <unistd.h>
-#define _SYS_STAT_H
-#include <bits/stat.h>
+#include <sys/stat.h>
-#define __NR___syscall_fstat __NR_fstat
-static inline _syscall2(int, __syscall_fstat, int, fd, struct stat *, buf);
libc_hidden_proto(fstat)
-strong_alias(__syscall_fstat,fstat)
+_syscall2(int, fstat, int, fd, struct stat *, buf);
libc_hidden_def(fstat)
diff --git a/libc/sysdeps/linux/frv/fstat64.c b/libc/sysdeps/linux/frv/fstat64.c
index 98c02e72d..e07a28471 100644
--- a/libc/sysdeps/linux/frv/fstat64.c
+++ b/libc/sysdeps/linux/frv/fstat64.c
@@ -9,29 +9,12 @@
* Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
-#define _GNU_SOURCE
-#define _LARGEFILE64_SOURCE
-#include <features.h>
-#undef __OPTIMIZE__
-/* We absolutely do _NOT_ want interfaces silently
- * * * renamed under us or very bad things will happen... */
-#ifdef __USE_FILE_OFFSET64
-# undef __USE_FILE_OFFSET64
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <endian.h>
-
+#include "../common/syscalls.h"
#include <unistd.h>
-#define _SYS_STAT_H
-#include <bits/stat.h>
+#include <sys/stat.h>
-#if defined __UCLIBC_HAS_LFS__
-#define __NR___syscall_fstat64 __NR_fstat64
-static inline _syscall2(int, __syscall_fstat64, int, fd, struct stat64 *, buf);
+#ifdef __UCLIBC_HAS_LFS__
libc_hidden_proto(fstat64)
-strong_alias(__syscall_fstat64,fstat64)
+_syscall2(int, fstat64, int, fd, struct stat64 *, buf);
libc_hidden_def(fstat64)
#endif
diff --git a/libc/sysdeps/linux/frv/lstat.c b/libc/sysdeps/linux/frv/lstat.c
index 9fe65a71c..b178af76b 100644
--- a/libc/sysdeps/linux/frv/lstat.c
+++ b/libc/sysdeps/linux/frv/lstat.c
@@ -9,27 +9,10 @@
* Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
-#define _GNU_SOURCE
-#define _LARGEFILE64_SOURCE
-#include <features.h>
-#undef __OPTIMIZE__
-/* We absolutely do _NOT_ want interfaces silently
- * * * renamed under us or very bad things will happen... */
-#ifdef __USE_FILE_OFFSET64
-# undef __USE_FILE_OFFSET64
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <endian.h>
-
+#include "../common/syscalls.h"
#include <unistd.h>
-#define _SYS_STAT_H
-#include <bits/stat.h>
+#include <sys/stat.h>
-#define __NR___syscall_lstat __NR_lstat
-static inline _syscall2(int, __syscall_lstat, const char *, file_name, struct stat *, buf);
libc_hidden_proto(lstat)
-strong_alias(__syscall_lstat,lstat)
+_syscall2(int, lstat, const char *, file_name, struct stat *, buf);
libc_hidden_def(lstat)
diff --git a/libc/sysdeps/linux/frv/lstat64.c b/libc/sysdeps/linux/frv/lstat64.c
index 50e62969f..9a6236b14 100644
--- a/libc/sysdeps/linux/frv/lstat64.c
+++ b/libc/sysdeps/linux/frv/lstat64.c
@@ -9,29 +9,12 @@
* Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
-#define _GNU_SOURCE
-#define _LARGEFILE64_SOURCE
-#include <features.h>
-#undef __OPTIMIZE__
-/* We absolutely do _NOT_ want interfaces silently
- * * * renamed under us or very bad things will happen... */
-#ifdef __USE_FILE_OFFSET64
-# undef __USE_FILE_OFFSET64
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <endian.h>
-
+#include "../common/syscalls.h"
#include <unistd.h>
-#define _SYS_STAT_H
-#include <bits/stat.h>
+#include <sys/stat.h>
-#if defined __UCLIBC_HAS_LFS__
-#define __NR___syscall_lstat64 __NR_lstat64
-static inline _syscall2(int, __syscall_lstat64, const char *, file_name, struct stat64 *, buf);
+#ifdef __UCLIBC_HAS_LFS__
libc_hidden_proto(lstat64)
-strong_alias(__syscall_lstat64,lstat64)
+_syscall2(int, lstat64, const char *, file_name, struct stat64 *, buf);
libc_hidden_def(lstat64)
#endif
diff --git a/libc/sysdeps/linux/frv/stat.c b/libc/sysdeps/linux/frv/stat.c
index cde54aecc..56cb668db 100644
--- a/libc/sysdeps/linux/frv/stat.c
+++ b/libc/sysdeps/linux/frv/stat.c
@@ -9,27 +9,10 @@
* Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
-#define _GNU_SOURCE
-#define _LARGEFILE64_SOURCE
-#include <features.h>
-#undef __OPTIMIZE__
-/* We absolutely do _NOT_ want interfaces silently
- * * * renamed under us or very bad things will happen... */
-#ifdef __USE_FILE_OFFSET64
-# undef __USE_FILE_OFFSET64
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <endian.h>
-
+#include "../common/syscalls.h"
#include <unistd.h>
-#define _SYS_STAT_H
-#include <bits/stat.h>
+#include <sys/stat.h>
-#define __NR___syscall_stat __NR_stat
-static inline _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf);
libc_hidden_proto(stat)
-strong_alias(__syscall_stat,stat)
+_syscall2(int, stat, const char *, file_name, struct stat *, buf);
libc_hidden_def(stat)
diff --git a/libc/sysdeps/linux/frv/stat64.c b/libc/sysdeps/linux/frv/stat64.c
index 97abf240a..641644ffd 100644
--- a/libc/sysdeps/linux/frv/stat64.c
+++ b/libc/sysdeps/linux/frv/stat64.c
@@ -9,29 +9,12 @@
* Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
-#define _GNU_SOURCE
-#define _LARGEFILE64_SOURCE
-#include <features.h>
-#undef __OPTIMIZE__
-/* We absolutely do _NOT_ want interfaces silently
- * * * renamed under us or very bad things will happen... */
-#ifdef __USE_FILE_OFFSET64
-# undef __USE_FILE_OFFSET64
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <endian.h>
-
+#include "../common/syscalls.h"
#include <unistd.h>
-#define _SYS_STAT_H
-#include <bits/stat.h>
+#include <sys/stat.h>
-#if defined __UCLIBC_HAS_LFS__
-#define __NR___syscall_stat64 __NR_stat64
-static inline _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf);
+#ifdef __UCLIBC_HAS_LFS__
libc_hidden_proto(stat64)
-strong_alias(__syscall_stat64,stat64)
+_syscall2(int, stat64, const char *, file_name, struct stat64 *, buf);
libc_hidden_def(stat64)
#endif