Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2981 → Rev 2982

/branches/dynload/uspace/lib/rtld/dynamic.c
98,6 → 98,7
(uintptr_t)info->soname, soname_idx, (uintptr_t)info->soname);
printf("soname='%s'\n", info->soname);
printf("rpath='%s'\n", info->rpath);
printf("hash=0x%x\n", (uintptr_t)info->hash);
 
/*
* Now that we have a pointer to the string table,
/branches/dynload/uspace/lib/rtld/rtld.c
70,7 → 70,7
 
printf("Program requested library '%s'\n", prog.dyn.needed);
rc = elf_load_file("/libtest.so.0", 0x20000, &lib_info);
rc = elf_load_file("/libc.so.0", 0x20000, &lib_info);
if (rc < 0) {
printf("failed to load library\n");
return;
/branches/dynload/uspace/lib/rtld/arch/ia32/src/reloc.c
87,16 → 87,18
rel_type = ELF32_R_TYPE(r_info);
r_ptr = (uint32_t *)(r_offset + m->bias);
 
printf("rel_type: %x, rel_offset: 0x%x\n", rel_type, r_offset);
sym_def = symbol_def_find(str_tab + sym->st_name, &dest);
printf("dest name: '%s'\n", dest->dyn.soname);
printf("dest bias: 0x%x\n", dest->bias);
if (sym_def) {
sym_addr = sym_def->st_value + dest->bias;
printf("symbol definition found, addr=0x%x\n", sym_addr);
} else {
printf("symbol definition not found\n");
continue;
if (sym->st_name != 0) {
printf("rel_type: %x, rel_offset: 0x%x\n", rel_type, r_offset);
sym_def = symbol_def_find(str_tab + sym->st_name, &dest);
printf("dest name: '%s'\n", dest->dyn.soname);
printf("dest bias: 0x%x\n", dest->bias);
if (sym_def) {
sym_addr = sym_def->st_value + dest->bias;
printf("symbol definition found, addr=0x%x\n", sym_addr);
} else {
printf("symbol definition not found\n");
continue;
}
}
 
switch (rel_type) {
/branches/dynload/uspace/lib/libc-shared/Makefile
34,13 → 34,14
 
LIBC_PREFIX = ../../lib/libc
SOFTINT_PREFIX = ../../lib/softint
RTLD_PREFIX = ../../lib/rtld
include $(LIBC_PREFIX)/Makefile.toolchain
#include arch/$(ARCH)/Makefile.inc
ARCH_SOURCES :=
 
LFLAGS = -shared -soname libc.so.0 --whole-archive
LFLAGS = -shared -soname libc.so.0 --whole-archive
 
LIBS = $(LIBC_PREFIX)/libc.pic.a $(SOFTINT_PREFIX)/libsoftint.a
LIBS = $(LIBC_PREFIX)/libc.pic.a $(SOFTINT_PREFIX)/libsoftint.a $(RTLD_PREFIX)/rtld.so
DEFS += -DRELEASE=\"$(RELEASE)\"
 
ifdef REVISION