/branches/dynload/uspace/lib/rtld/rtld.c |
---|
35,8 → 35,6 |
*/ |
#include <stdio.h> |
#include <unistd.h> |
#include <fcntl.h> |
static void kputint(unsigned i) |
{ |
52,28 → 50,13 |
int z = 42; |
void _putint(int i); |
void test_func(void); |
void test_func(void) |
{ |
int fd, rc; |
char buf[5]; |
kputint(-1); |
kputint(z); |
printf("Hello, world! (from rtld)\n"); |
fd = open("/test", O_RDONLY); |
if (fd < 0) { printf("fd<0 ("); _putint(fd); printf(")\n"); } |
fd = 0; |
rc = read(fd, &buf, 4); |
//printf(" ->%d\n", rc); |
buf[4]='\0'; |
printf(buf); |
getchar(); |
printf("x\n"); |
while(1); |