Changes in / [a71d2630:f798178] in mainline


Ignore:
Files:
9 added
26 deleted
24 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.build

    ra71d2630 rf798178  
    111111
    112112$(RAW): $(OBJECTS) $(COMPONENT_OBJECTS) $(LINK)
    113         $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(COMPONENT_OBJECTS) $(OBJECTS)
     113        $(LD) -n $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(COMPONENT_OBJECTS) $(OBJECTS)
    114114
    115115$(LINK): $(LINK).comp $(DEPEND)
  • kernel/Makefile

    ra71d2630 rf798178  
    134134#
    135135AFLAGS =
    136 LFLAGS = -N -T $(LINK) -M
     136LFLAGS = -n -T $(LINK) -M
    137137
    138138#
  • uspace/Makefile.common

    ra71d2630 rf798178  
    203203
    204204$(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    205         $(LD) -N $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
     205        $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    206206ifeq ($(CONFIG_STRIP_BINARIES),y)
    207207        $(STRIP) $(BINARY)
  • uspace/lib/c/Makefile

    ra71d2630 rf798178  
    4242CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
    4343
     44LINKER_SCRIPTS = \
     45        $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld \
     46        $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld
     47
    4448PRE_DEPEND = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(INCLUDE_RTLDARCH) $(COMMON_HEADER_ARCH)
    45 EXTRA_OUTPUT = $(LINKER_SCRIPT)
    46 EXTRA_CLEAN = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(INCLUDE_RTLDARCH) $(COMMON_HEADER_ARCH) $(LINKER_SCRIPT)
     49EXTRA_OUTPUT = $(LINKER_SCRIPTS)
     50EXTRA_CLEAN = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(INCLUDE_RTLDARCH) $(COMMON_HEADER_ARCH) $(LINKER_SCRIPTS)
    4751LIBRARY = libc
    4852SLIBRARY = libc.so.0.0
     
    149153        ln -sfn ../$< $@
    150154
    151 $(LINKER_SCRIPT): $(LINKER_SCRIPT).in
     155$(LIBC_PREFIX)/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    152156        $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@
     157
     158$(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
     159        $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@
    153160
    154161$(COMMON_HEADER_ARCH): $(COMMON_HEADER)
  • uspace/lib/c/arch/abs32le/Makefile.inc

    ra71d2630 rf798178  
    2929ARCH_SOURCES = \
    3030        arch/$(UARCH)/src/entry.c \
     31        arch/$(UARCH)/src/entryjmp.c \
    3132        arch/$(UARCH)/src/thread_entry.c \
    3233        arch/$(UARCH)/src/fibril.c \
  • uspace/lib/c/arch/abs32le/_link.ld.in

    ra71d2630 rf798178  
    33
    44PHDRS {
     5#ifdef LOADER
     6        interp PT_INTERP;
     7        text PT_LOAD FILEHDR PHDRS FLAGS(5);
     8#else
    59        text PT_LOAD FLAGS(5);
     10#endif
    611        data PT_LOAD FLAGS(6);
    712}
    813
    914SECTIONS {
     15#ifdef LOADER
     16        .interp : {
     17                *(.interp);
     18        } :interp
     19       
     20        . = 0x70001000 + SIZEOF_HEADERS;
     21#else
    1022        . = 0x1000 + SIZEOF_HEADERS;
    11        
     23#endif
    1224        .text : {
    1325                *(.text .text.*);
  • uspace/lib/c/arch/amd64/Makefile.inc

    ra71d2630 rf798178  
    2929ARCH_SOURCES = \
    3030        arch/$(UARCH)/src/entry.s \
     31        arch/$(UARCH)/src/entryjmp.s \
    3132        arch/$(UARCH)/src/thread_entry.s \
    3233        arch/$(UARCH)/src/syscall.S \
  • uspace/lib/c/arch/amd64/_link.ld.in

    ra71d2630 rf798178  
    33
    44PHDRS {
     5#ifdef LOADER
     6        interp PT_INTERP;
     7        text PT_LOAD FILEHDR PHDRS FLAGS(5);
     8#else
    59        text PT_LOAD FLAGS(5);
     10#endif
    611        data PT_LOAD FLAGS(6);
    712        debug PT_NOTE;
     
    914
    1015SECTIONS {
     16#ifdef LOADER
     17        .interp : {
     18                *(.interp);
     19        } :interp
     20       
     21        . = 0x70001000 + SIZEOF_HEADERS;
     22#else
    1123        . = 0x1000 + SIZEOF_HEADERS;
    12        
     24#endif
    1325        .init : {
    1426                *(.init);
  • uspace/lib/c/arch/arm32/Makefile.inc

    ra71d2630 rf798178  
    3030ARCH_SOURCES = \
    3131        arch/$(UARCH)/src/entry.s \
     32        arch/$(UARCH)/src/entryjmp.s \
    3233        arch/$(UARCH)/src/thread_entry.s \
    3334        arch/$(UARCH)/src/syscall.c \
  • uspace/lib/c/arch/arm32/_link.ld.in

    ra71d2630 rf798178  
    33
    44PHDRS {
     5#ifdef LOADER
     6        interp PT_INTERP;
     7        text PT_LOAD FILEHDR PHDRS FLAGS(5);
     8#else
    59        text PT_LOAD FLAGS(5);
     10#endif
    611        data PT_LOAD FLAGS(6);
    712}
    813
    914SECTIONS {
     15#ifdef LOADER
     16        .interp : {
     17                *(.interp);
     18        } :interp
     19       
     20        . = 0x70001000 + SIZEOF_HEADERS;
     21#else
    1022        . = 0x1000 + SIZEOF_HEADERS;
    11        
     23#endif
    1224        .init : {
    1325                *(.init);
  • uspace/lib/c/arch/ia32/Makefile.inc

    ra71d2630 rf798178  
    2929ARCH_SOURCES = \
    3030        arch/$(UARCH)/src/entry.s \
     31        arch/$(UARCH)/src/entryjmp.s \
    3132        arch/$(UARCH)/src/thread_entry.s \
    3233        arch/$(UARCH)/src/syscall.S \
  • uspace/lib/c/arch/ia32/_link.ld.in

    ra71d2630 rf798178  
    33
    44PHDRS {
     5#ifdef LOADER
     6        interp PT_INTERP;
     7        text PT_LOAD FILEHDR PHDRS FLAGS(5);
     8#else
    59        text PT_LOAD FLAGS(5);
     10#endif
    611        data PT_LOAD FLAGS(6);
    712        debug PT_NOTE;
     
    914
    1015SECTIONS {
     16#ifdef LOADER
     17        .interp : {
     18                *(.interp);
     19        } :interp
     20
     21        . = 0x70001000 + SIZEOF_HEADERS;
     22#else
    1123        . = 0x1000 + SIZEOF_HEADERS;
    12        
     24#endif
    1325        .init : {
    1426                *(.init);
  • uspace/lib/c/arch/ia64/Makefile.inc

    ra71d2630 rf798178  
    2929ARCH_SOURCES = \
    3030        arch/$(UARCH)/src/entry.s \
     31        arch/$(UARCH)/src/entryjmp.s \
    3132        arch/$(UARCH)/src/thread_entry.s \
    3233        arch/$(UARCH)/src/syscall.S \
  • uspace/lib/c/arch/ia64/_link.ld.in

    ra71d2630 rf798178  
    33
    44PHDRS {
     5#ifdef LOADER
     6        interp PT_INTERP;
    57        text PT_LOAD FLAGS(5);
     8#else
     9        text PT_LOAD FLAGS(5);
     10#endif
    611        data PT_LOAD FLAGS(6);
    712}
    813
    914SECTIONS {
     15#ifdef LOADER
     16        .interp : {
     17                *(.interp);
     18        } :interp
     19       
     20        . = 0x800000000 + SIZEOF_HEADERS;
     21#else
    1022        . = 0x4000 + SIZEOF_HEADERS;
    11        
     23#endif
     24        /*
     25         * XXX This is just a work around. Problem: .init section does not
     26         * have the proper alignment.
     27         */
     28        . = ALIGN(., 16);
     29
    1230        .init : {
    1331                *(.init);
  • uspace/lib/c/arch/mips32/Makefile.inc

    ra71d2630 rf798178  
    2929ARCH_SOURCES = \
    3030        arch/$(UARCH)/src/entry.s \
     31        arch/$(UARCH)/src/entryjmp.s \
    3132        arch/$(UARCH)/src/thread_entry.s \
    3233        arch/$(UARCH)/src/syscall.c \
  • uspace/lib/c/arch/mips32/_link.ld.in

    ra71d2630 rf798178  
    33
    44PHDRS {
     5#ifdef LOADER
     6        interp PT_INTERP;
     7        text PT_LOAD FILEHDR PHDRS FLAGS(5);
     8#else
    59        text PT_LOAD FLAGS(5);
     10#endif
    611        data PT_LOAD FLAGS(6);
    712}
    813
    914SECTIONS {
     15#ifdef LOADER
     16        .interp : {
     17                *(.interp);
     18        } :interp
     19       
     20        . = 0x70004000 + SIZEOF_HEADERS;
     21#else
    1022        . = 0x4000 + SIZEOF_HEADERS;
    11        
     23#endif
    1224        .init : {
    1325                *(.init);
  • uspace/lib/c/arch/mips32eb/Makefile.inc

    ra71d2630 rf798178  
    2929ARCH_SOURCES = \
    3030        arch/$(UARCH)/src/entry.s \
     31        arch/$(UARCH)/src/entryjmp.s \
    3132        arch/$(UARCH)/src/thread_entry.s \
    3233        arch/$(UARCH)/src/syscall.c \
  • uspace/lib/c/arch/ppc32/Makefile.inc

    ra71d2630 rf798178  
    2929ARCH_SOURCES = \
    3030        arch/$(UARCH)/src/entry.s \
     31        arch/$(UARCH)/src/entryjmp.s \
    3132        arch/$(UARCH)/src/thread_entry.s \
    3233        arch/$(UARCH)/src/syscall.c \
  • uspace/lib/c/arch/ppc32/_link.ld.in

    ra71d2630 rf798178  
    33
    44PHDRS {
     5#ifdef LOADER
     6        interp PT_INTERP;
     7        text PT_LOAD FILEHDR PHDRS FLAGS(5);
     8#else
    59        text PT_LOAD FLAGS(5);
     10#endif
    611        data PT_LOAD FLAGS(6);
    712}
    813
    914SECTIONS {
     15#ifdef LOADER
     16        .itnerp : {
     17                *(.interp);
     18        } :interp
     19       
     20        . = 0x70001000 + SIZEOF_HEADERS;
     21#else
    1022        . = 0x1000 + SIZEOF_HEADERS;
    11        
     23#endif
    1224        .init : {
    1325                *(.init);
  • uspace/lib/c/arch/sparc64/Makefile.inc

    ra71d2630 rf798178  
    2929ARCH_SOURCES = \
    3030        arch/$(UARCH)/src/entry.s \
     31        arch/$(UARCH)/src/entryjmp.s \
    3132        arch/$(UARCH)/src/thread_entry.s \
    3233        arch/$(UARCH)/src/fibril.S \
  • uspace/lib/c/arch/sparc64/_link.ld.in

    ra71d2630 rf798178  
    33
    44PHDRS {
     5#ifdef LOADER
     6        interp PT_INTERP;
     7        text PT_LOAD FILEHDR PHDRS FLAGS(5);
     8#else
    59        text PT_LOAD FLAGS(5);
     10#endif
    611        data PT_LOAD FLAGS(6);
    712}
    813
    914SECTIONS {
     15#ifdef LOADER
     16        .interp : {
     17                *(.interp);
     18        } :interp
     19       
     20        . = 0x70004000 + SIZEOF_HEADERS;
     21#else
    1022        . = 0x4000 + SIZEOF_HEADERS;
    11        
     23#endif
    1224        .init : {
    1325                *(.init);
  • uspace/srv/loader/Makefile

    ra71d2630 rf798178  
    3636-include $(COMMON_MAKEFILE)
    3737-include $(CONFIG_MAKEFILE)
    38 -include arch/$(UARCH)/Makefile.inc
    3938
    40 LINKER_SCRIPT = arch/$(UARCH)/_link.ld
    41 EXTRA_CLEAN = $(LINKER_SCRIPT)
     39LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld
    4240
    4341EXTRA_CFLAGS = -Iinclude -I../../lib/c/rtld/include
     
    5553
    5654include $(USPACE_PREFIX)/Makefile.common
    57 
    58 $(LINKER_SCRIPT): $(LINKER_SCRIPT).in
    59         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@
  • uspace/srv/loader/elf_load.c

    ra71d2630 rf798178  
    22 * Copyright (c) 2006 Sergey Bondari
    33 * Copyright (c) 2006 Jakub Jermar
    4  * Copyright (c) 2008 Jiri Svoboda
     4 * Copyright (c) 2011 Jiri Svoboda
    55 * All rights reserved.
    66 *
     
    5353#include <smc.h>
    5454#include <loader/pcb.h>
     55#include <entry_point.h>
    5556
    5657#include "elf.h"
    5758#include "elf_load.h"
    58 #include "arch.h"
    5959
    6060#define DPRINTF(...)
  • uspace/srv/loader/main.c

    ra71d2630 rf798178  
    5555#include <macros.h>
    5656#include <loader/pcb.h>
     57#include <entry_point.h>
    5758#include <errno.h>
    5859#include <async.h>
     
    7172#define DPRINTF(...)
    7273
    73 void program_run(void *entry, pcb_t *pcb);
    7474static int ldr_load_dyn_linked(elf_info_t *p_info);
    7575
     
    394394        async_answer_0(rid, EOK);
    395395        DPRINTF("Jump to entry point at %p\n", pcb.entry);
    396         program_run(prog_info.entry, &pcb);
     396        entry_point_jmp(prog_info.entry, &pcb);
    397397       
    398398        /* Not reached */
Note: See TracChangeset for help on using the changeset viewer.