MIPS NPTL patches
Dan E
trg_info at mailhaven.com
Thu Apr 9 03:40:40 UTC 2009
I have a couple of patches that advance the effort (I think) of getting
NPTL working on MIPS. This is the first. There are 2 others I'll post
afterward. I separated them because the first one is necessary, the
second one is possibly necessary, and the third one is probably not
needed, but I couldn't get uClibc with NPTL to build without it. More
commentary with the other patches. They are all against svn 26031,
which I updated to earlier this evening.
---------- patch start ----------
Index: uClibc-nptl/include/unistd.h
===================================================================
--- uClibc-nptl/include/unistd.h (revision 26031)
+++ uClibc-nptl/include/unistd.h (working copy)
@@ -771,7 +771,7 @@
#endif /* Use BSD. */
/* Special exit function which only terminates the current thread. */
-extern void __exit_thread (int val) __attribute__ ((noreturn));
+extern void __exit_thread (int val) __attribute__ ((__noreturn__));
/* Return the pathname of the terminal FD is open on, or NULL on
errors.
The returned storage is good only until the next call to this
function. */
Index: uClibc-nptl/ldso/ldso/mips/elfinterp.c
===================================================================
--- uClibc-nptl/ldso/ldso/mips/elfinterp.c (revision 26031)
+++ uClibc-nptl/ldso/ldso/mips/elfinterp.c (working copy)
@@ -210,7 +210,7 @@
if (ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_LOCAL) {
_dl_find_hash((strtab + symtab[symtab_index].st_name),
-
_dl_symbol_tables, tpnt_tls, 1, &sym_tls);
+
_dl_symbol_tables, tpnt_tls, 1, &tpnt_tls);
}
switch (reloc_type)
Index: uClibc-nptl/ldso/ldso/mips/dl-sysdep.h
===================================================================
--- uClibc-nptl/ldso/ldso/mips/dl-sysdep.h (revision 26031)
+++ uClibc-nptl/ldso/ldso/mips/dl-sysdep.h (working copy)
@@ -127,7 +127,7 @@
GOT_BASE[0] = (unsigned long) _dl_runtime_resolve; \
GOT_BASE[1] = (unsigned long) MODULE; \
\
- pltgot = MODULE->dynamic_info[DT_MIPS_PLTGOT_IDX];
\
+ pltgot = (unsigned long *)
MODULE->dynamic_info[DT_MIPS_PLTGOT_IDX]; \
if (pltgot) { \
pltgot[0] = (unsigned long) _dl_runtime_pltresolve; \
pltgot[1] = (unsigned long) MODULE; \
Index: uClibc-nptl/ldso/include/ldso.h
===================================================================
--- uClibc-nptl/ldso/include/ldso.h (revision 26031)
+++ uClibc-nptl/ldso/include/ldso.h (working copy)
@@ -40,6 +40,7 @@
#ifdef __UCLIBC_HAS_TLS__
/* Defines USE_TLS */
#include <tls.h>
+#include <dl-tls.h>
#endif
#include <dl-hash.h>
Index: uClibc-nptl/libc/signal/sigpause.c
===================================================================
--- uClibc-nptl/libc/signal/sigpause.c (revision 26031)
+++ uClibc-nptl/libc/signal/sigpause.c (working copy)
@@ -23,6 +23,7 @@
#define __FAVOR_BSD
#include <signal.h>
#include <stddef.h> /* For NULL. */
+#include <string.h>
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
#include <sysdep-cancel.h>
#endif
---------- patch end ------------
That's the first patch I ever submitted on a mailing list. Please,
$DEITY, let it go through cleanly!
--
http://www.fastmail.fm - Faster than the air-speed velocity of an
unladen european swallow
More information about the uClibc
mailing list