Magellan Linux

Annotation of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/i386/sysstub.ph

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (hide annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 597 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 niro 532 # -*- perl -*-
2     #
3     # arch/i386/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     open(OUT, '>', "${outputdir}/${fname}.S");
12     print OUT "#include <asm/unistd.h>\n";
13     print OUT "\n";
14     print OUT "\t.type ${fname},\@function\n";
15     print OUT "\t.globl ${fname}\n";
16     print OUT "${fname}:\n";
17    
18     $stype = 'common' if ( $stype eq '' );
19    
20     print OUT "\tpushl \$__NR_${sname}\n";
21     print OUT "\tjmp __syscall_$stype\n";
22     print OUT "\t.size ${fname},.-${fname}\n";
23     close(OUT);
24     }
25    
26     1;