m68k: fix loading of GOT for Coldfire

This commit is contained in:
Andreas Schwab 2010-08-02 18:48:56 +02:00
parent 2aed4f91fd
commit 690d264a40
4 changed files with 12 additions and 1 deletions

View 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>

View 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

View 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

View 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; \