Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3772 → Rev 3771

/branches/dynload/uspace/lib/libtest/arch/mips32/_link.ld.in
File deleted
/branches/dynload/uspace/lib/libc/shared/arch/mips32/_lib.ld.in
File deleted
/branches/dynload/uspace/lib/libc/shared/arch/mips32/_link.ld.in
File deleted
/branches/dynload/uspace/lib/libc/Makefile
119,7 → 119,7
-makedepend $(DEFS) $(PIC_CFLAGS) -o.pio -f - $(ARCH_SOURCES) $(GENERIC_SOURCES) >> Makefile.depend 2> /dev/null
 
libc.a: depend $(OBJECTS)
$(AR) rc $@ $(LIBS) $(OBJECTS)
$(AR) rc $@ $(LIBS) $(OBJECTS) $(RTLD_PREFIX)/librtld.a
 
libc.pic.a: depend $(PIC_OBJECTS)
$(AR) rc $@ $(LIBS) $(PIC_OBJECTS)
/branches/dynload/uspace/lib/libc/arch/mips32/src/tls.c
46,25 → 46,5
tls_free_variant_1(tcb, size);
}
 
typedef struct {
unsigned long ti_module;
unsigned long ti_offset;
} tls_index;
 
void *__tls_get_addr(tls_index *ti);
 
/* mips32 uses TLS variant 1 */
void *__tls_get_addr(tls_index *ti)
{
uint8_t *tls;
uint32_t v;
 
tls = (uint8_t *)__tcb_get() + sizeof(tcb_t);
 
/* Hopefully this is right. No docs found. */
v = (uint32_t) (tls + ti->ti_offset + 0x8000);
return (void *) v;
}
 
/** @}
*/
/branches/dynload/uspace/lib/rtld/symbol.c
212,15 → 212,8
}
}
 
/* Not DT_SYMBOLIC or no match. Now try other locations. */
 
if (runtime_env->program) {
/* Program is dynamic -- start with program as root. */
return symbol_bfs_find(name, runtime_env->program, mod);
} else {
/* Program is static -- start with @a origin as root. */
return symbol_bfs_find(name, origin, mod);
}
/* Otherwise start in the executable program */
return symbol_bfs_find(name, runtime_env->program, mod);
}
 
uintptr_t symbol_get_addr(elf_symbol_t *sym, module_t *m)
/branches/dynload/uspace/lib/rtld/arch/mips32/include/elf_dyn.h
File deleted
/branches/dynload/uspace/lib/rtld/arch/mips32/include/dynamic.h
File deleted
/branches/dynload/uspace/lib/rtld/arch/mips32/Makefile.inc
File deleted
/branches/dynload/uspace/lib/rtld/arch/mips32/src/dynamic.c
File deleted
/branches/dynload/uspace/lib/rtld/arch/mips32/src/reloc.c
File deleted
/branches/dynload/uspace/lib/rtld/arch/ia32/src/dynamic.c
File deleted
/branches/dynload/uspace/lib/rtld/arch/ia32/include/dynamic.h
File deleted
/branches/dynload/uspace/lib/rtld/arch/ia32/Makefile.inc
29,5 → 29,4
CFLAGS += -D__32_BITS__
 
ARCH_SOURCES := \
arch/$(ARCH)/src/dynamic.c \
arch/$(ARCH)/src/reloc.c
/branches/dynload/uspace/lib/rtld/arch/ppc32/include/dynamic.h
File deleted
/branches/dynload/uspace/lib/rtld/arch/ppc32/src/dynamic.c
File deleted
/branches/dynload/uspace/lib/rtld/arch/ppc32/src/reloc.c
85,9 → 85,6
{
uint32_t *plt;
uint32_t *_plt_ent;
/* No lazy linking -- no pre-processing yet. */
return;
 
plt = m->dyn.plt_got;
if (!plt) {
/branches/dynload/uspace/lib/rtld/arch/ppc32/Makefile.inc
29,5 → 29,4
CFLAGS += -D__32_BITS__
 
ARCH_SOURCES := \
arch/$(ARCH)/src/dynamic.c \
arch/$(ARCH)/src/reloc.c
/branches/dynload/uspace/lib/rtld/include/dynamic.h
37,7 → 37,6
 
#include <bool.h>
#include <elf_dyn.h>
#include <arch/dynamic.h>
 
/**
* Holds the data extracted from an ELF Dynamic section.
46,7 → 45,7
* to their final run-time values by adding the load bias
* and indices into the symbol table are converted to pointers.
*/
typedef struct dyn_info {
typedef struct {
/** Type of relocations used for the PLT, either DT_REL or DT_RELA */
int plt_rel;
 
93,13 → 92,9
 
/** Pointer to the module's dynamic section */
elf_dyn_t *dynamic;
 
/** Architecture-specific info. */
dyn_info_arch_t arch;
} dyn_info_t;
 
void dynamic_parse(elf_dyn_t *dyn_ptr, size_t bias, dyn_info_t *info);
void dyn_parse_arch(elf_dyn_t *dp, size_t bias, dyn_info_t *info);
 
#endif
 
/branches/dynload/uspace/lib/rtld/dynamic.c
87,10 → 87,7
case DT_JMPREL: info->jmp_rel = d_ptr; break;
case DT_BIND_NOW: info->bind_now = true; break;
 
default:
if (dp->d_tag >= DT_LOPROC && dp->d_tag <= DT_HIPROC)
dyn_parse_arch(dp, bias, info);
break;
default: break;
}
 
++dp;
/branches/dynload/uspace/srv/loader/main.c
225,8 → 225,6
{
int rc;
 
printf("Load program '%s'\n", pathname);
 
rc = elf_load_file(pathname, 0, 0, &prog_info);
if (rc < 0) {
printf("Failed to load executable '%s'.\n", pathname);
234,17 → 232,11
return 1;
}
 
printf("Create PCB\n");
 
elf_create_pcb(&prog_info, &pcb);
 
printf("Fill args\n");
 
pcb.argc = argc;
pcb.argv = argv;
 
printf("Check interp\n");
 
if (prog_info.interp == NULL) {
/* Statically linked program */
is_dyn_linked = false;
290,7 → 282,6
program_run(interp_info.entry, &pcb);
 
} else {
printf("Run static program\n");
/* Statically linked program */
close_console();
ipc_answer_0(rid, EOK);
/branches/dynload/uspace/srv/loader/elf_load.c
306,13 → 306,10
printf("dynamic section found at 0x%x\n",
(uintptr_t)elf->info->dynamic);
break;
case 0x70000000:
/* FIXME: MIPS reginfo */
break;
case PT_SHLIB:
case PT_NOTE:
// case PT_LOPROC:
// case PT_HIPROC:
case PT_LOPROC:
case PT_HIPROC:
default:
printf("segment p_type %d unknown\n", entry->p_type);
return EE_UNSUPPORTED;
377,8 → 374,7
a = as_area_create((uint8_t *)base + bias, mem_sz,
AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE);
if (a == (void *)(-1)) {
printf("memory mapping failed (0x%x, %d)\n",
base+bias, mem_sz);
printf("memory mapping failed\n");
return EE_MEMORY;
}
 
/branches/dynload/uspace/app/dload/dload.c
80,7 → 80,7
runtime_env->program = &prog;
 
/* Work around non-existent memory space allocation. */
runtime_env->next_bias = 0x1000000;
runtime_env->next_bias = 0x100000;
 
/*
* Now we can continue with loading all other modules.
/branches/dynload/uspace/app/dload/arch/mips32/Makefile.inc
File deleted
/branches/dynload/uspace/app/dload/arch/mips32/mips32.s
File deleted
/branches/dynload/uspace/app/dload/arch/mips32/_link.ld.in
File deleted
/branches/dynload/boot/arch/mips32/loader/Makefile
106,16 → 106,10
RD_APPS = \
$(USPACEDIR)/app/tetris/tetris \
$(USPACEDIR)/app/tester/tester \
$(USPACEDIR)/app/dload/dload \
$(USPACEDIR)/app/dltest/dltest \
$(USPACEDIR)/app/trace/trace \
$(USPACEDIR)/app/bdsh/bdsh \
$(USPACEDIR)/app/klog/klog
 
RD_LIBS = \
$(USPACEDIR)/lib/libc/shared/libc.so.0 \
$(USPACEDIR)/lib/libtest/libtest.so.0
 
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS))))
 
140,13 → 134,10
done
-rm -f _components.h _components.c _link.ld _link.ld.in $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend
 
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_LIBS) $(RD_APPS) _link.ld.in
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in
for file in $(RD_SRVS) ; do \
cp $$file $(USPACEDIR)/dist/srv/ ; \
done
for lib in $(RD_LIBS) ; do \
cp $$lib $(USPACEDIR)/dist/lib/ ; \
done
for file in $(RD_APPS) ; do \
cp $$file $(USPACEDIR)/dist/app/ ; \
done