]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
m68k: fix loading of GOT for Coldfire
authorAndreas Schwab <schwab@linux-m68k.org>
Mon, 2 Aug 2010 16:48:56 +0000 (18:48 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Mon, 2 Aug 2010 16:48:56 +0000 (18:48 +0200)
ChangeLog.m68k
sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h
sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h
sysdeps/unix/sysv/linux/m68k/sysdep.h

index 6fdd4e13e43d02f1f540a1688c1a18e178597fcd..284a3bf399b8bf972357d42c520448ff6f7dec24 100644 (file)
@@ -6,9 +6,13 @@
        (PCREL_OP): Define.
        * sysdeps/m68k/sysdep.h (PCREL_OP): Don't define here.
        * sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h: New file.
+       (SYSCALL_ERROR_LOAD_GOT): Define.
        * sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h: New file.
+       (SYSCALL_ERROR_LOAD_GOT): Define.
        * sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't include subordinate
        sysdep files.
+       (SYSCALL_ERROR_HANDLER) [PIC && USE___THREAD]: Use
+       SYSCALL_ERROR_LOAD_GOT.
 
 2010-06-24  Joseph Myers  <joseph@codesourcery.com>
 
index d7c523db406e1fcd2e852c7bf692f7550d01cf9b..e129dc1ec4c7d7e9b677718d0a8be685c79d0052 100644 (file)
@@ -23,4 +23,8 @@
 #include <sysdeps/m68k/coldfire/sysdep.h>
 #include <sysdeps/unix/sysv/linux/m68k/sysdep.h>
 
+#define SYSCALL_ERROR_LOAD_GOT(reg)                                          \
+    move.l #_GLOBAL_OFFSET_TABLE_@GOTPC, reg;                                \
+    lea (-6, %pc, reg), reg
+
 #endif
index 651128cd4e4868c52a26a936d6e2dda46c6ea812..371befb275792d06f86f1cc64faa2f84fbab4f03 100644 (file)
@@ -23,4 +23,7 @@
 #include <sysdeps/m68k/m680x0/sysdep.h>
 #include <sysdeps/unix/sysv/linux/m68k/sysdep.h>
 
+#define SYSCALL_ERROR_LOAD_GOT(reg)                                          \
+    lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), reg
+
 #endif
index 3e7b105d0d6ce367429a71f5a668f34ff5a63783..d381189fe51147a878a9c38b76c636441909e4e1 100644 (file)
@@ -117,7 +117,7 @@ SYSCALL_ERROR_LABEL:                                                              \
     neg.l %d0;                                                               \
     move.l %d0, -(%sp);                                                              \
     jbsr __m68k_read_tp@PLTPC;                                               \
-    lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), %a1;                             \
+    SYSCALL_ERROR_LOAD_GOT (%a1);                                            \
     add.l (SYSCALL_ERROR_ERRNO@TLSIE, %a1), %a0;                             \
     move.l (%sp)+, (%a0);                                                    \
     move.l &-1, %d0;                                                         \