/branches/dynload/uspace/lib/rtld/rtld.c/rtld.c |
---|
34,6 → 34,8 |
* @file |
*/ |
#include <stdio.h> |
static void kputint(unsigned i) |
{ |
unsigned dummy; |
43,12 → 45,21 |
: "=d" (dummy) /* output - %edx clobbered */ |
: "d" (i) /* input */ |
: "%eax","%ecx" /* all scratch registers clobbered */ |
); |
); |
} |
int z = 42; |
void test_func(void); |
void test_func(void) |
{ |
kputint(-1); |
kputint(z); |
printf("Hello, world! (from rtld)\n"); |
getchar(); |
printf("x\n"); |
while(1); |
asm ( |
"movl $253, %%eax;" |
"int $0x30" |
55,7 → 66,7 |
: /* output */ |
: /* input */ |
: "%eax","%ecx","%edx" /* all scratch registers clobbered */ |
); |
); |
} |