aboutsummaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorDaniel THOMPSON <daniel.thompson@st.com>2006-08-10 16:15:52 +0100
committerH. Peter Anvin <hpa@zytor.com>2006-08-14 15:04:10 -0700
commit9052947014248b6f5feb13ad2d4b7fdcdf10872d (patch)
tree371beab8b57cc88a6587724ab920f2ba4cecffd2 /usr
parent00d1660fc1bf5c97125668046034606147e85de4 (diff)
downloadlinux-2.6-klibc-9052947014248b6f5feb13ad2d4b7fdcdf10872d.tar.gz
sh: fix build
Hi Folks A few trivial changes to the sh arch support to get everything to build. Everything links OK but although we can welcome the world with open arms few of the other test program run correctly ... -- Daniel Thompson (STMicroelectronics) <daniel.thompson@st.com> 1000 Aztec West, Almondsbury, Bristol, BS32 4SQ. 01454 462659 If a car is a horseless carriage then is a motorcycle a horseless horse?
Diffstat (limited to 'usr')
-rw-r--r--usr/include/arch/sh/klibc/archstat.h2
-rw-r--r--usr/klibc/arch/sh/syscall.S10
-rw-r--r--usr/klibc/arch/sh/sysstub.ph12
3 files changed, 14 insertions, 10 deletions
diff --git a/usr/include/arch/sh/klibc/archstat.h b/usr/include/arch/sh/klibc/archstat.h
index f4c65ead38fe07..4f39181ecf2401 100644
--- a/usr/include/arch/sh/klibc/archstat.h
+++ b/usr/include/arch/sh/klibc/archstat.h
@@ -8,7 +8,7 @@
/* This matches struct stat64 in glibc2.1, hence the absolutely
* insane amounts of padding around dev_t's.
*/
-struct stat64 {
+struct stat {
__stdev64 (st_dev);
unsigned char __pad0[4];
diff --git a/usr/klibc/arch/sh/syscall.S b/usr/klibc/arch/sh/syscall.S
index 41a0486679b016..f5f85cc9bcb1c1 100644
--- a/usr/klibc/arch/sh/syscall.S
+++ b/usr/klibc/arch/sh/syscall.S
@@ -10,10 +10,10 @@
.section ".text.syscall","ax"
.align 2
- .globl ___syscall_common
- .type ___syscall_common,@function
-___syscall_common:
- mov.l @(sp),r0
+ .globl __syscall_common
+ .type __syscall_common,@function
+__syscall_common:
+ mov.l @(0,sp),r0
mov.l @(4,sp),r1
trapa #0x15
mov.l 1f,r0
@@ -32,4 +32,4 @@ ___syscall_common:
1: .long -4096 /* Errno limit */
2: .long errno
- .size ___syscall_common,.-___syscall_common
+ .size __syscall_common,.-__syscall_common
diff --git a/usr/klibc/arch/sh/sysstub.ph b/usr/klibc/arch/sh/sysstub.ph
index ce04b739e95034..0ff46dda13530d 100644
--- a/usr/klibc/arch/sh/sysstub.ph
+++ b/usr/klibc/arch/sh/sysstub.ph
@@ -15,18 +15,22 @@ sub make_sysstub($$$$$@) {
print OUT "\t.type\t${fname},\#function\n";
print OUT "\t.globl\t${fname}\n";
print OUT "\t.align\t2\n";
+ print OUT "\t.import __syscall_common\n";
print OUT "${fname}:\n";
- print OUT "\tbra\t__syscall_common\n";
- print OUT "#if __NR_${sname} >= 128\n";
print OUT "\t mov.l\t1f, r3\n";
+ print OUT "\t jmp\t\@r3\n";
+ print OUT "#if __NR_${sname} >= 128\n";
+ print OUT "\t mov.l\t2f, r3\n";
print OUT "#else\n";
print OUT "\t mov\t# __NR_${sname}, r3\n";
print OUT "#endif\n";
print OUT "\t.size ${fname},.-${fname}\n";
print OUT "\n";
- print OUT "#if __NR_${sname} >= 128\n";
print OUT "\t.align\t2\n";
- print OUT "1:\t.long\t__NR_${sname}\n";
+ print OUT "\t.import\t__syscall_common\n";
+ print OUT "1:\t.long\t__syscall_common\n";
+ print OUT "#if __NR_${sname} >= 128\n";
+ print OUT "2:\t.long\t__NR_${sname}\n";
print OUT "#endif\n";
close(OUT);
}