Changeset c53d906 in mainline


Ignore:
Timestamp:
2011-04-30T10:06:44Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1fdf53
Parents:
fcfd002
Message:

Merge linker script for the loader into the default linker script in C
library.

Location:
uspace
Files:
9 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/Makefile

    rfcfd002 rc53d906  
    4141CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
    4242
     43LINKER_SCRIPTS = \
     44        $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld \
     45        $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld
     46
    4347PRE_DEPEND = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(COMMON_HEADER_ARCH)
    44 EXTRA_OUTPUT = $(LINKER_SCRIPT)
    45 EXTRA_CLEAN = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(COMMON_HEADER_ARCH) $(LINKER_SCRIPT)
     48EXTRA_OUTPUT = $(LINKER_SCRIPTS)
     49EXTRA_CLEAN = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(COMMON_HEADER_ARCH) $(LINKER_SCRIPTS)
    4650LIBRARY = libc
    4751
     
    133137        ln -sfn ../$< $@
    134138
    135 $(LINKER_SCRIPT): $(LINKER_SCRIPT).in
     139$(LIBC_PREFIX)/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    136140        $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@
     141
     142$(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
     143        $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@
    137144
    138145$(COMMON_HEADER_ARCH): $(COMMON_HEADER)
  • uspace/lib/c/arch/abs32le/_link.ld.in

    rfcfd002 rc53d906  
    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/_link.ld.in

    rfcfd002 rc53d906  
    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/_link.ld.in

    rfcfd002 rc53d906  
    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/_link.ld.in

    rfcfd002 rc53d906  
    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/_link.ld.in

    rfcfd002 rc53d906  
    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
    1224        .init : {
    1325                *(.init);
  • uspace/lib/c/arch/mips32/_link.ld.in

    rfcfd002 rc53d906  
    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        . = 0x4000 + SIZEOF_HEADERS;
    11        
     23#endif
    1224        .init : {
    1325                *(.init);
  • uspace/lib/c/arch/ppc32/_link.ld.in

    rfcfd002 rc53d906  
    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/_link.ld.in

    rfcfd002 rc53d906  
    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

    rfcfd002 rc53d906  
    3737-include $(CONFIG_MAKEFILE)
    3838
    39 LINKER_SCRIPT = arch/$(UARCH)/_link.ld
    40 EXTRA_CLEAN = $(LINKER_SCRIPT)
     39LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld
    4140
    4241EXTRA_CFLAGS = -Iinclude
     
    5453
    5554include $(USPACE_PREFIX)/Makefile.common
    56 
    57 $(LINKER_SCRIPT): $(LINKER_SCRIPT).in
    58         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@
Note: See TracChangeset for help on using the changeset viewer.