/branches/network/uspace/srv/loader/main.c |
---|
27,12 → 27,12 |
*/ |
/** @addtogroup loader |
* @brief Loads and runs programs from VFS. |
* @brief Loads and runs programs from VFS. |
* @{ |
*/ |
*/ |
/** |
* @file |
* @brief Loads and runs programs from VFS. |
* @brief Loads and runs programs from VFS. |
* |
* The program loader is a special init binary. Its image is used |
* to create a new task upon a @c task_spawn syscall. The syscall |
46,9 → 46,11 |
#include <stdio.h> |
#include <stdlib.h> |
#include <unistd.h> |
#include <bool.h> |
#include <fcntl.h> |
#include <sys/types.h> |
#include <ipc/ipc.h> |
#include <ipc/services.h> |
#include <ipc/loader.h> |
#include <loader/pcb.h> |
#include <errno.h> |
58,11 → 60,7 |
#include <elf.h> |
#include <elf_load.h> |
/** |
* Bias used for loading the dynamic linker. This will be soon replaced |
* by automatic placement. |
*/ |
#define RTLD_BIAS 0x80000 |
#define DPRINTF(...) |
/** Pathname of the file that will be loaded */ |
static char *pathname = NULL; |
77,6 → 75,36 |
/** Buffer holding all arguments */ |
static char *arg_buf = NULL; |
static elf_info_t prog_info; |
static elf_info_t interp_info; |
static bool is_dyn_linked; |
/** Used to limit number of connections to one. */ |
static bool connected; |
static void loader_get_taskid(ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_callid_t callid; |
task_id_t task_id; |
size_t len; |
task_id = task_get_id(); |
if (!ipc_data_read_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
if (len > sizeof(task_id)) |
len = sizeof(task_id); |
ipc_data_read_finalize(callid, &task_id, len); |
ipc_answer_0(rid, EOK); |
} |
/** Receive a call setting pathname of the program to execute. |
* |
* @param rid |
87,13 → 115,13 |
ipc_callid_t callid; |
size_t len; |
char *name_buf; |
if (!ipc_data_write_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
name_buf = malloc(len + 1); |
if (!name_buf) { |
ipc_answer_0(callid, ENOMEM); |
100,15 → 128,15 |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
ipc_data_write_finalize(callid, name_buf, len); |
ipc_answer_0(rid, EOK); |
if (pathname != NULL) { |
free(pathname); |
pathname = NULL; |
} |
name_buf[len] = '\0'; |
pathname = name_buf; |
} |
124,23 → 152,23 |
size_t buf_len, arg_len; |
char *p; |
int n; |
if (!ipc_data_write_receive(&callid, &buf_len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
if (arg_buf != NULL) { |
free(arg_buf); |
arg_buf = NULL; |
} |
if (argv != NULL) { |
free(argv); |
argv = NULL; |
} |
arg_buf = malloc(buf_len + 1); |
if (!arg_buf) { |
ipc_answer_0(callid, ENOMEM); |
147,12 → 175,12 |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
ipc_data_write_finalize(callid, arg_buf, buf_len); |
ipc_answer_0(rid, EOK); |
arg_buf[buf_len] = '\0'; |
/* |
* Count number of arguments |
*/ |
163,10 → 191,10 |
p = p + arg_len + 1; |
++n; |
} |
/* Allocate argv */ |
argv = malloc((n + 1) * sizeof(char *)); |
if (argv == NULL) { |
free(arg_buf); |
ipc_answer_0(callid, ENOMEM); |
173,7 → 201,7 |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
/* |
* Fill argv with argument pointers |
*/ |
181,78 → 209,91 |
n = 0; |
while (p < arg_buf + buf_len) { |
argv[n] = p; |
arg_len = strlen(p); |
p = p + arg_len + 1; |
++n; |
} |
argc = n; |
argv[n] = NULL; |
} |
/** Load and run the previously selected program. |
/** Load the previously selected program. |
* |
* @param rid |
* @param request |
* @return 0 on success, !0 on error. |
*/ |
static int loader_run(ipc_callid_t rid, ipc_call_t *request) |
static int loader_load(ipc_callid_t rid, ipc_call_t *request) |
{ |
int rc; |
elf_info_t prog_info; |
elf_info_t interp_info; |
// printf("Load program '%s'\n", pathname); |
rc = elf_load_file(pathname, 0, &prog_info); |
if (rc < 0) { |
printf("failed to load program\n"); |
DPRINTF("Failed to load executable '%s'.\n", pathname); |
ipc_answer_0(rid, EINVAL); |
return 1; |
} |
// printf("Create PCB\n"); |
elf_create_pcb(&prog_info, &pcb); |
pcb.argc = argc; |
pcb.argv = argv; |
if (prog_info.interp == NULL) { |
/* Statically linked program */ |
// printf("Run statically linked program\n"); |
// printf("entry point: 0x%llx\n", prog_info.entry); |
is_dyn_linked = false; |
ipc_answer_0(rid, EOK); |
close_console(); |
elf_run(&prog_info, &pcb); |
return 0; |
} |
printf("Load dynamic linker '%s'\n", prog_info.interp); |
rc = elf_load_file("/rtld.so", RTLD_BIAS, &interp_info); |
rc = elf_load_file(prog_info.interp, 0, &interp_info); |
if (rc < 0) { |
printf("failed to load dynamic linker\n"); |
DPRINTF("Failed to load interpreter '%s.'\n", |
prog_info.interp); |
ipc_answer_0(rid, EINVAL); |
return 1; |
} |
is_dyn_linked = true; |
ipc_answer_0(rid, EOK); |
return 0; |
} |
/* |
* Provide dynamic linker with some useful data |
*/ |
pcb.rtld_dynamic = interp_info.dynamic; |
pcb.rtld_bias = RTLD_BIAS; |
printf("run dynamic linker\n"); |
printf("entry point: 0x%llx\n", interp_info.entry); |
close_console(); |
/** Run the previously loaded program. |
* |
* @param rid |
* @param request |
* @return 0 on success, !0 on error. |
*/ |
static void loader_run(ipc_callid_t rid, ipc_call_t *request) |
{ |
const char *cp; |
/* Set the task name. */ |
cp = strrchr(pathname, '/'); |
cp = (cp == NULL) ? pathname : (cp + 1); |
task_set_name(cp); |
if (is_dyn_linked == true) { |
/* Dynamically linked program */ |
DPRINTF("Run ELF interpreter.\n"); |
DPRINTF("Entry point: 0x%lx\n", interp_info.entry); |
close_console(); |
ipc_answer_0(rid, EOK); |
elf_run(&interp_info, &pcb); |
} else { |
/* Statically linked program */ |
close_console(); |
ipc_answer_0(rid, EOK); |
elf_run(&prog_info, &pcb); |
} |
ipc_answer_0(rid, EOK); |
elf_run(&interp_info, &pcb); |
/* Not reached */ |
return 0; |
} |
/** Handle loader connection. |
265,24 → 306,43 |
ipc_callid_t callid; |
ipc_call_t call; |
int retval; |
/* Already have a connection? */ |
if (connected) { |
ipc_answer_0(iid, ELIMIT); |
return; |
} |
connected = true; |
/* Accept the connection */ |
ipc_answer_0(iid, EOK); |
/* Ignore parameters, the connection is already open */ |
(void)iid; (void)icall; |
(void) iid; |
(void) icall; |
while (1) { |
callid = async_get_call(&call); |
// printf("received call from phone %d, method=%d\n", |
// call.in_phone_hash, IPC_GET_METHOD(call)); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
exit(0); |
case LOADER_GET_TASKID: |
loader_get_taskid(callid, &call); |
continue; |
case LOADER_SET_PATHNAME: |
loader_set_pathname(callid, &call); |
continue; |
case LOADER_SET_ARGS: |
loader_set_args(callid, &call); |
continue; |
case LOADER_LOAD: |
loader_load(callid, &call); |
continue; |
case LOADER_RUN: |
loader_run(callid, &call); |
exit(0); |
continue; |
/* Not reached */ |
default: |
retval = ENOENT; |
break; |
289,7 → 349,7 |
} |
if ((callid & IPC_CALLID_NOTIFICATION) == 0 && |
IPC_GET_METHOD(call) != IPC_M_PHONE_HUNGUP) { |
printf("responding EINVAL to method %d\n", |
DPRINTF("Responding EINVAL to method %d.\n", |
IPC_GET_METHOD(call)); |
ipc_answer_0(callid, EINVAL); |
} |
300,31 → 360,20 |
*/ |
int main(int argc, char *argv[]) |
{ |
ipc_callid_t callid; |
ipc_call_t call; |
ipcarg_t phone_hash; |
/* The first call only communicates the incoming phone hash */ |
callid = ipc_wait_for_call(&call); |
if (IPC_GET_METHOD(call) != LOADER_HELLO) { |
if (IPC_GET_METHOD(call) != IPC_M_PHONE_HUNGUP) |
ipc_answer_0(callid, EINVAL); |
return 1; |
} |
ipc_answer_0(callid, EOK); |
phone_hash = call.in_phone_hash; |
/* |
* Up until now async must not be used as it couldn't |
* handle incoming requests. (Which means e.g. printf() |
* cannot be used) |
*/ |
async_new_connection(phone_hash, 0, NULL, loader_connection); |
ipcarg_t phonead; |
connected = false; |
/* Set a handler of incomming connections. */ |
async_set_client_connection(loader_connection); |
/* Register at naming service. */ |
if (ipc_connect_to_me(PHONE_NS, SERVICE_LOAD, 0, 0, &phonead) != 0) |
return -1; |
async_manager(); |
/* not reached */ |
/* Never reached */ |
return 0; |
} |
/branches/network/uspace/srv/loader/elf_load.c |
---|
57,6 → 57,8 |
#include "elf_load.h" |
#include "arch.h" |
#define DPRINTF(...) |
static char *error_codes[] = { |
"no error", |
"invalid image", |
106,11 → 108,9 |
int fd; |
int rc; |
// printf("open and read '%s'...\n", file_name); |
fd = open(file_name, O_RDONLY); |
if (fd < 0) { |
printf("failed opening file\n"); |
DPRINTF("failed opening file\n"); |
return -1; |
} |
171,19 → 171,18 |
rc = my_read(elf->fd, header, sizeof(elf_header_t)); |
if (rc < 0) { |
printf("read error\n"); |
DPRINTF("Read error.\n"); |
return EE_INVALID; |
} |
elf->header = header; |
// printf("ELF-load:"); |
/* Identify ELF */ |
if (header->e_ident[EI_MAG0] != ELFMAG0 || |
header->e_ident[EI_MAG1] != ELFMAG1 || |
header->e_ident[EI_MAG2] != ELFMAG2 || |
header->e_ident[EI_MAG3] != ELFMAG3) { |
printf("invalid header\n"); |
DPRINTF("Invalid header.\n"); |
return EE_INVALID; |
} |
193,18 → 192,18 |
header->e_ident[EI_VERSION] != EV_CURRENT || |
header->e_version != EV_CURRENT || |
header->e_ident[EI_CLASS] != ELF_CLASS) { |
printf("incompatible data/version/class\n"); |
DPRINTF("Incompatible data/version/class.\n"); |
return EE_INCOMPATIBLE; |
} |
if (header->e_phentsize != sizeof(elf_segment_header_t)) { |
printf("e_phentsize:%d != %d\n", header->e_phentsize, |
DPRINTF("e_phentsize:%d != %d\n", header->e_phentsize, |
sizeof(elf_segment_header_t)); |
return EE_INCOMPATIBLE; |
} |
if (header->e_shentsize != sizeof(elf_section_header_t)) { |
printf("e_shentsize:%d != %d\n", header->e_shentsize, |
DPRINTF("e_shentsize:%d != %d\n", header->e_shentsize, |
sizeof(elf_section_header_t)); |
return EE_INCOMPATIBLE; |
} |
211,23 → 210,19 |
/* Check if the object type is supported. */ |
if (header->e_type != ET_EXEC && header->e_type != ET_DYN) { |
printf("Object type %d is not supported\n", header->e_type); |
DPRINTF("Object type %d is not supported\n", header->e_type); |
return EE_UNSUPPORTED; |
} |
/* Shared objects can be loaded with a bias */ |
// printf("Object type: %d\n", header->e_type); |
if (header->e_type == ET_DYN) |
elf->bias = so_bias; |
else |
elf->bias = 0; |
// printf("Bias set to 0x%x\n", elf->bias); |
elf->info->interp = NULL; |
elf->info->dynamic = NULL; |
// printf("parse segments\n"); |
/* Walk through all segment headers and process them. */ |
for (i = 0; i < header->e_phnum; i++) { |
elf_segment_header_t segment_hdr; |
239,7 → 234,7 |
rc = my_read(elf->fd, &segment_hdr, |
sizeof(elf_segment_header_t)); |
if (rc < 0) { |
printf("read error\n"); |
DPRINTF("Read error.\n"); |
return EE_INVALID; |
} |
248,7 → 243,7 |
return rc; |
} |
// printf("parse sections\n"); |
DPRINTF("Parse sections.\n"); |
/* Inspect all section headers and proccess them. */ |
for (i = 0; i < header->e_shnum; i++) { |
261,7 → 256,7 |
rc = my_read(elf->fd, §ion_hdr, |
sizeof(elf_section_header_t)); |
if (rc < 0) { |
printf("read error\n"); |
DPRINTF("Read error.\n"); |
return EE_INVALID; |
} |
273,7 → 268,7 |
elf->info->entry = |
(entry_point_t)((uint8_t *)header->e_entry + elf->bias); |
// printf("done\n"); |
DPRINTF("Done.\n"); |
return EE_OK; |
} |
316,7 → 311,7 |
case PT_LOPROC: |
case PT_HIPROC: |
default: |
printf("segment p_type %d unknown\n", entry->p_type); |
DPRINTF("Segment p_type %d unknown.\n", entry->p_type); |
return EE_UNSUPPORTED; |
break; |
} |
339,8 → 334,8 |
size_t mem_sz; |
int rc; |
// printf("load segment at addr 0x%x, size 0x%x\n", entry->p_vaddr, |
// entry->p_memsz); |
DPRINTF("Load segment at addr 0x%x, size 0x%x\n", entry->p_vaddr, |
entry->p_memsz); |
bias = elf->bias; |
347,7 → 342,7 |
if (entry->p_align > 1) { |
if ((entry->p_offset % entry->p_align) != |
(entry->p_vaddr % entry->p_align)) { |
printf("align check 1 failed offset%%align=%d, " |
DPRINTF("Align check 1 failed offset%%align=%d, " |
"vaddr%%align=%d\n", |
entry->p_offset % entry->p_align, |
entry->p_vaddr % entry->p_align |
369,8 → 364,8 |
base = ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE); |
mem_sz = entry->p_memsz + (entry->p_vaddr - base); |
// printf("map to p_vaddr=0x%x-0x%x...\n", entry->p_vaddr + bias, |
// entry->p_vaddr + bias + ALIGN_UP(entry->p_memsz, PAGE_SIZE)); |
DPRINTF("Map to p_vaddr=0x%x-0x%x.\n", entry->p_vaddr + bias, |
entry->p_vaddr + bias + ALIGN_UP(entry->p_memsz, PAGE_SIZE)); |
/* |
* For the course of loading, the area needs to be readable |
379,17 → 374,16 |
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\n"); |
DPRINTF("Memory mapping failed.\n"); |
return EE_MEMORY; |
} |
// printf("as_area_create(0x%lx, 0x%x, %d) -> 0x%lx\n", |
// entry->p_vaddr+bias, entry->p_memsz, flags, (uintptr_t)a); |
DPRINTF("as_area_create(0x%lx, 0x%x, %d) -> 0x%lx\n", |
entry->p_vaddr+bias, entry->p_memsz, flags, (uintptr_t)a); |
/* |
* Load segment data |
*/ |
// printf("seek to %d\n", entry->p_offset); |
rc = lseek(elf->fd, entry->p_offset, SEEK_SET); |
if (rc < 0) { |
printf("seek error\n"); |
396,11 → 390,10 |
return EE_INVALID; |
} |
// printf("read 0x%x bytes to address 0x%x\n", entry->p_filesz, entry->p_vaddr+bias); |
/* rc = read(fd, (void *)(entry->p_vaddr + bias), entry->p_filesz); |
if (rc < 0) { printf("read error\n"); return EE_INVALID; }*/ |
/* Long reads are not possible yet. Load segment picewise */ |
/* Long reads are not possible yet. Load segment piecewise. */ |
unsigned left, now; |
uint8_t *dp; |
412,12 → 405,10 |
now = 16384; |
if (now > left) now = left; |
// printf("read %d...", now); |
rc = my_read(elf->fd, dp, now); |
// printf("->%d\n", rc); |
if (rc < 0) { |
printf("read error\n"); |
DPRINTF("Read error.\n"); |
return EE_INVALID; |
} |
425,10 → 416,9 |
dp += now; |
} |
// printf("set area flags to %d\n", flags); |
rc = as_area_change_flags((uint8_t *)entry->p_vaddr + bias, flags); |
if (rc != 0) { |
printf("failed to set memory area flags\n"); |
DPRINTF("Failed to set memory area flags.\n"); |
return EE_MEMORY; |
} |
465,7 → 455,7 |
/* Record pointer to dynamic section into info structure */ |
elf->info->dynamic = |
(void *)((uint8_t *)entry->sh_addr + elf->bias); |
printf("dynamic section found at 0x%x\n", |
DPRINTF("Dynamic section found at 0x%x.\n", |
(uintptr_t)elf->info->dynamic); |
break; |
default: |
/branches/network/uspace/srv/loader/Makefile |
---|
27,30 → 27,19 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
include ../../../version |
include ../../Makefile.config |
## Setup toolchain |
# |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
include arch/$(ARCH)/Makefile.inc |
include arch/$(UARCH)/Makefile.inc |
CFLAGS += -Iinclude |
LIBS = $(LIBC_PREFIX)/libc.a $(SOFTINT_PREFIX)/libsoftint.a |
DEFS += -DRELEASE=\"$(RELEASE)\" |
ifdef REVISION |
DEFS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
DEFS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
## Sources |
# |
70,18 → 59,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm arch/$(ARCH)/_link.ld Makefile.depend |
-rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm arch/$(UARCH)/_link.ld Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) arch/$(ARCH)/_link.ld |
$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(OBJECTS) $(LIBS) -o $@ -Map $(OUTPUT).map |
$(OUTPUT): $(OBJECTS) $(LIBS) arch/$(UARCH)/_link.ld |
$(LD) -T arch/$(UARCH)/_link.ld $(LFLAGS) $(OBJECTS) $(LIBS) -o $@ -Map $(OUTPUT).map |
disasm: |
$(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
arch/$(UARCH)/_link.ld: arch/$(UARCH)/_link.ld.in |
$(CC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@ |
%.o: %.S |
/branches/network/uspace/srv/loader/arch/sparc64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/network/uspace/srv/loader/arch/sparc64/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__64_BITS__ |
ARCH_SOURCES := arch/$(ARCH)/sparc64.s |
ARCH_SOURCES := arch/$(UARCH)/sparc64.s |
/branches/network/uspace/srv/loader/arch/ia64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
12,15 → 12,10 |
*(.interp); |
} :interp |
. = 0x00084000 + SIZEOF_HEADERS; |
/* On Itanium code sections must be aligned to 16 bytes. */ |
. = ALIGN(0x800000000 + SIZEOF_HEADERS, 16); |
.init : { |
LONG(0); |
LONG(0); |
LONG(0); |
LONG(0); |
LONG(0); |
LONG(0); |
*(.init); |
} : text |
.text : { |
/branches/network/uspace/srv/loader/arch/ia64/Makefile.inc |
---|
27,5 → 27,5 |
# |
CFLAGS += -D__64_BITS__ |
ARCH_SOURCES := arch/$(ARCH)/ia64.s |
ARCH_SOURCES := arch/$(UARCH)/ia64.s |
AFLAGS += -xexplicit |
/branches/network/uspace/srv/loader/arch/arm32/_link.ld.in |
---|
1,8 → 1,8 |
/* |
/* |
* The only difference from _link.ld.in for regular statically-linked apps |
* is the base address. |
*/ |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/network/uspace/srv/loader/arch/arm32/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__32_BITS__ |
ARCH_SOURCES := arch/$(ARCH)/arm32.s |
ARCH_SOURCES := arch/$(UARCH)/arm32.s |
/branches/network/uspace/srv/loader/arch/mips32eb |
---|
0,0 → 1,0 |
link mips32 |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/network/uspace/srv/loader/arch/ppc32/_link.ld.in |
---|
1,8 → 1,8 |
/* |
/* |
* The only difference from _link.ld.in for regular statically-linked apps |
* is the base address. |
*/ |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/network/uspace/srv/loader/arch/ppc32/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__32_BITS__ |
ARCH_SOURCES := arch/$(ARCH)/ppc32.s |
ARCH_SOURCES := arch/$(UARCH)/ppc32.s |
/branches/network/uspace/srv/loader/arch/ppc32/ppc32.s |
---|
36,5 → 36,5 |
# Jump to a program entry point |
program_run: |
mtctr %r3 |
mr %r3, %r4 # Pass pcb to the entry point in %r3 |
mr %r6, %r4 # Pass pcb to the entry point in %r6 |
bctr |
/branches/network/uspace/srv/loader/arch/amd64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/network/uspace/srv/loader/arch/amd64/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__64_BITS__ |
ARCH_SOURCES := arch/$(ARCH)/amd64.s |
ARCH_SOURCES := arch/$(UARCH)/amd64.s |
/branches/network/uspace/srv/loader/arch/mips32/_link.ld.in |
---|
1,8 → 1,8 |
/* |
/* |
* The only difference from _link.ld.in for regular statically-linked apps |
* is the base address. |
*/ |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/network/uspace/srv/loader/arch/mips32/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__32_BITS__ |
ARCH_SOURCES := arch/$(ARCH)/mips32.s |
ARCH_SOURCES := arch/$(UARCH)/mips32.s |
/branches/network/uspace/srv/loader/arch/ia32/_link.ld.in |
---|
1,8 → 1,8 |
/* |
/* |
* The difference from _link.ld.in for regular statically-linked apps |
* is the base address and the special interp section. |
*/ |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/network/uspace/srv/loader/arch/ia32/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__32_BITS__ |
ARCH_SOURCES := arch/$(ARCH)/ia32.s |
ARCH_SOURCES := arch/$(UARCH)/ia32.s |