Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2978 → Rev 2982

/branches/dynload/uspace/app/dltest/dltest.c
34,12 → 34,8
* @file
*/
 
#include <libtest.h>
#include <stdio.h>
 
void __io_init(void);
void __main(void);
void __exit(void);
 
static void kputint(unsigned i)
{
unsigned dummy;
52,36 → 48,16
);
}
 
 
/*static void test(void)
int main(int argc, char *argv[])
{
kputint(-1);
kputint(42);
kputint(0x100);
printf("Hello from dltest!\n");
kputint(0x200);
while(1);
}*/
 
int main(int argc, char *argv[])
{
// test();
/* Unreachable, yet. Just to create a relocation entry */
test_func();
return 0;
}
 
void __io_init(void)
{
}
 
void __main(void)
{
main(0, 0);
}
 
void __exit(void)
{
}
 
 
/** @}
*/
 
/branches/dynload/uspace/app/dltest/Makefile
34,13 → 34,14
 
LIBC_PREFIX = ../../lib/libc
SOFTINT_PREFIX = ../../lib/softint
RTLD_PREFIX = ../../lib/rtld
include $(LIBC_PREFIX)/Makefile.toolchain
 
CFLAGS += -I../../lib/libtest -O0
LFLAGS := -Bdynamic -I/rtld.so
CFLAGS += -I../../lib/libc -O0
LFLAGS := -Bdynamic -I/rtld.so -rpath-link $(RTLD_PREFIX)
 
# LIBS = $(LIBC_PREFIX)/libc.a
LIBS = ../../lib/libtest/libtest.so.0
LIBS = ../../lib/libc-shared/libc.so.0
DEFS += -DRELEASE=\"$(RELEASE)\"
 
ifdef REVISION
/branches/dynload/uspace/app/iloader/include/pcb.h
33,7 → 33,7
#ifndef ILOADER_PCB_H_
#define ILOADER_PCB_H_
 
#define PCB_ADDRESS 0x40000
#define PCB_ADDRESS 0x6000000
 
typedef void (*entry_point_t)(void);
 
/branches/dynload/uspace/app/iramfs/data.h
45,9 → 45,9
extern const size_t dltest_size;
extern const char dltest_filename[];
 
extern const uint8_t libtest[];
extern const size_t libtest_size;
extern const char libtest_filename[];
extern const uint8_t libc[];
extern const size_t libc_size;
extern const char libc_filename[];
 
#endif
 
/branches/dynload/uspace/app/iramfs/main.c
88,7 → 88,7
 
if (write_file(rtld, rtld_size, rtld_filename) < 0) return 1;
if (write_file(dltest, dltest_size, dltest_filename) < 0) return 1;
if (write_file(libtest, libtest_size, libtest_filename) < 0) return 1;
if (write_file(libc, libc_size, libc_filename) < 0) return 1;
 
printf("done\n");
getchar();
/branches/dynload/uspace/app/iramfs/Makefile
87,7 → 87,7
%.o: %.c
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
 
data.c: ../../lib/rtld/rtld.so ../dltest/dltest ../../lib/libtest/libtest.so
data.c: ../../lib/rtld/rtld.so ../dltest/dltest ../../lib/libc-shared/libc.so.0
../../../tools/bin2c.py ../../lib/rtld/rtld.so rtld.so rtld >$@
../../../tools/bin2c.py ../dltest/dltest dltest dltest >>$@
../../../tools/bin2c.py ../../lib/libtest/libtest.so libtest.so.0 libtest >>$@
../../../tools/bin2c.py ../../lib/libc-shared/libc.so.0 libc.so.0 libc >>$@