Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/sparc/sysstub.ph

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 593 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 # -*- perl -*-
2 #
3 # arch/sparc32/sysstub.ph
4 #
5 # Script to generate system call stubs
6 #
7
8 sub make_sysstub($$$$$@) {
9 my($outputdir, $fname, $type, $sname, $stype, @args) = @_;
10
11 $stype = $stype || 'common';
12
13 open(OUT, '>', "${outputdir}/${fname}.S");
14 print OUT "#include <asm/unistd.h>\n";
15 print OUT "\n";
16 print OUT "\t.type ${fname},\@function\n";
17 print OUT "\t.globl ${fname}\n";
18 print OUT "${fname}:\n";
19 print OUT "\tb __syscall_${stype}\n";
20 print OUT "\t mov\t__NR_${sname}, %g1\n";
21 print OUT "\t.size ${fname},.-${fname}\n";
22 close(OUT);
23 }
24
25 1;