summaryrefslogtreecommitdiff
path: root/ports/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'ports/sysdeps')
-rw-r--r--ports/sysdeps/m68k/stackinfo.h10
-rw-r--r--ports/sysdeps/mips/dl-lookup.c4
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/ioperm.c5
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c1
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c1
5 files changed, 16 insertions, 5 deletions
diff --git a/ports/sysdeps/m68k/stackinfo.h b/ports/sysdeps/m68k/stackinfo.h
index b44d4d0ee..bcfdb1285 100644
--- a/ports/sysdeps/m68k/stackinfo.h
+++ b/ports/sysdeps/m68k/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2010, 2011 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
@@ -31,4 +31,12 @@
is present, but it is presumed absent. */
#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+/* Access to the stack pointer. */
+#define stackinfo_get_sp() \
+ ({ void *p__; asm volatile ("move.l %%sp, %0" : "=r" (p__)); p__; })
+#define stackinfo_sub_sp(ptr) \
+ ({ ptrdiff_t d__; \
+ asm volatile ("sub.l %%sp, %0" : "=r" (d__) : "0" (ptr)); \
+ d__; })
+
#endif /* stackinfo.h */
diff --git a/ports/sysdeps/mips/dl-lookup.c b/ports/sysdeps/mips/dl-lookup.c
index 6b36c34a8..fed3b6c66 100644
--- a/ports/sysdeps/mips/dl-lookup.c
+++ b/ports/sysdeps/mips/dl-lookup.c
@@ -877,7 +877,6 @@ internal_function
_dl_setup_hash (struct link_map *map)
{
Elf_Symndx *hash;
- Elf_Symndx nchain;
if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
+ DT_THISPROCNUM + DT_VERSIONTAGNUM
@@ -909,7 +908,8 @@ _dl_setup_hash (struct link_map *map)
hash = (void *) D_PTR (map, l_info[DT_HASH]);
map->l_nbuckets = *hash++;
- nchain = *hash++;
+ /* Skip nchain. */
+ hash++;
map->l_buckets = hash;
hash += map->l_nbuckets;
map->l_chain = hash;
diff --git a/ports/sysdeps/unix/sysv/linux/arm/ioperm.c b/ports/sysdeps/unix/sysv/linux/arm/ioperm.c
index 8af1ea356..8ac9b09c2 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1998, 1999, 2003, 2005, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2003, 2005, 2008, 2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Phil Blundell, based on the Alpha version by
David Mosberger.
@@ -135,7 +136,7 @@ init_iosys (void)
{
FILE * fp;
- fp = fopen (PATH_CPUINFO, "r");
+ fp = fopen (PATH_CPUINFO, "rce");
if (! fp)
return -1;
while ((n = fscanf (fp, "Hardware\t: %256[^\n]\n", systype))
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c
new file mode 100644
index 000000000..46389568b
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c
@@ -0,0 +1 @@
+#include <io/ftw.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c
new file mode 100644
index 000000000..cb02172b3
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c
@@ -0,0 +1 @@
+#include <io/ftw64.c>