diff --git a/src/bin/rtld-elf/rtld.c b/src/bin/rtld-elf/rtld.c index 8cc9ffe..2bc7ad4 100644 --- a/src/bin/rtld-elf/rtld.c +++ b/src/bin/rtld-elf/rtld.c @@ -424,12 +424,10 @@ } allocate_initial_tls(obj_list); -//while (1); if (relocate_objects(obj_main, ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld) == -1) die(); - dbg("doing copy relocations"); if (do_copy_relocations(obj_main) == -1) die(); @@ -1479,7 +1477,7 @@ for (obj = first; obj != NULL; obj = obj->next) { if (obj != rtldobj) - dbg("relocating \"%s\"", obj->path); + dbg("relocating (\"%s\")", obj->path); if (obj->nbuckets == 0 || obj->nchains == 0 || obj->buckets == NULL || obj->symtab == NULL || obj->strtab == NULL) { _rtld_error("%s: Shared object has no run-time symbol table", diff --git a/src/bin/rtld-elf/rtld_machdep.h b/src/bin/rtld-elf/rtld_machdep.h index 3bc939e..466b777 100644 --- a/src/bin/rtld-elf/rtld_machdep.h +++ b/src/bin/rtld-elf/rtld_machdep.h @@ -41,16 +41,11 @@ ((const Elf_Dyn *)((obj)->relocbase + (Elf_Addr)&_DYNAMIC)) /* Fixup the jump slot at "where" to transfer control to "target". */ -static inline Elf_Addr -reloc_jmpslot(Elf_Addr *where, Elf_Addr target, - const struct Struct_Obj_Entry *obj, - const struct Struct_Obj_Entry *refobj, const Elf_Rel *rel) -{ - dbg("reloc_jmpslot: *%p = %p", (void *)(where), - (void *)(target)); - (*(Elf_Addr *)(where) = (Elf_Addr)(target)); - return target; -} +static inline Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const struct Struct_Obj_Entry *obj, const struct Struct_Obj_Entry *refobj, const Elf_Rel *rel) { + dbg("reloc_jmpslot: *%p = %p", (void *)(where), (void *)(target)); + (*(Elf_Addr *)(where) = (Elf_Addr)(target)); + return target; + } #define make_function_pointer(def, defobj) \ ((defobj)->relocbase + (def)->st_value) diff --git a/src/lib/libc/libc.inc b/src/lib/libc/libc.inc index 29e8a8a..3943ce5 100644 --- a/src/lib/libc/libc.inc +++ b/src/lib/libc/libc.inc @@ -10,5 +10,6 @@ CFLAGS_UTHREAD = -fpic -DPIC -O2 -fno-strict-aliasing -pipe -DPTHREAD_KERNEL -D_LOCK_DEBUG -D_PTHREADS_INVARIANTS .endif + INCLUDES = -I/usr/home/reddawg/source/ubixos/src/include.new -I/usr/home/reddawg/source/ubixos/src/lib/libc/include -I/home/reddawg/source/ubixos/src/lib/libc/i386 -I/home/reddawg/source/ubixos/src/contrib/gdtoa -I/home/reddawg/source/ubixos/src/lib/libc -I/home/reddawg/source/ubixos/src/lib/libc/resolv -I/home/reddawg/source/ubixos/src/lib/libc/locale -I/home/reddawg/source/ubixos/src/lib/libc/rpc diff --git a/src/sys/vmm/paging.c b/src/sys/vmm/paging.c index 28e43eb..0c82b7d 100644 --- a/src/sys/vmm/paging.c +++ b/src/sys/vmm/paging.c @@ -458,8 +458,6 @@ addr = (vm_offset_t) uap->addr; - kprintf("MMAP!!!!"); - #ifdef DEBUG if (uap->addr != 0x0) { kprintf("Address hints are not supported yet.\n"); @@ -474,8 +472,8 @@ #endif if (uap->fd == -1) { -kprintf("HMM?"); - td->td_retval[0] = vmmGetFreeVirtualPage(_current->id,uap->len/0x1000,VM_TASK); + /* NEED ROUND PAGE */ + td->td_retval[0] = vmmGetFreeVirtualPage(_current->id,(uap->len + 0xFFF)/0x1000,VM_TASK); } else { kprintf("uap->flags: [0x%X]\n",uap->flags);