Index: uspace/srv/loader/Makefile
===================================================================
--- uspace/srv/loader/Makefile	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ uspace/srv/loader/Makefile	(revision 3f461ecf935dddebd8b8b62ca732ea02b8580294)
@@ -37,6 +37,5 @@
 -include $(CONFIG_MAKEFILE)
 
-LINKER_SCRIPT = arch/$(UARCH)/_link.ld
-EXTRA_CLEAN = $(LINKER_SCRIPT)
+LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld
 
 EXTRA_CFLAGS = -Iinclude
@@ -54,5 +53,2 @@
 
 include $(USPACE_PREFIX)/Makefile.common
-
-$(LINKER_SCRIPT): $(LINKER_SCRIPT).in
-	$(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@
Index: uspace/srv/loader/arch/abs32le/_link.ld.in
===================================================================
--- uspace/srv/loader/arch/abs32le/_link.ld.in	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
- * The difference from _link.ld.in for regular statically-linked apps
- * is the base address and the special interp section.
- */
-
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	interp PT_INTERP;
-	text PT_LOAD FILEHDR PHDRS FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	.interp : {
-		*(.interp);
-	} :interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-	. = . + 0x1000;
-	
-	.data : {
-		*(.data);
-		*(.data.rel*);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		*(.gnu.linkonce.tb.*);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.sbss : {
-		*(.scommon);
-		*(.sbss);
-	}
-	
-	.bss : {
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/srv/loader/arch/amd64/_link.ld.in
===================================================================
--- uspace/srv/loader/arch/amd64/_link.ld.in	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/*
- * The difference from _link.ld.in for regular statically-linked apps
- * is the base address and the special interp section.
- */
-
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	interp PT_INTERP;
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-	debug PT_NOTE;
-}
-
-SECTIONS {
-	.interp : {
-		*(.interp);
-	} :interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-	. = . + 0x1000;
-	
-	.data : {
-		*(.data);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.bss : {
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-#ifdef CONFIG_LINE_DEBUG
-	.comment 0 : { *(.comment); } :debug
-	.debug_abbrev 0 : { *(.debug_abbrev); } :debug
-	.debug_aranges 0 : { *(.debug_aranges); } :debug
-	.debug_info 0 : { *(.debug_info); } :debug
-	.debug_line 0 : { *(.debug_line); } :debug
-	.debug_loc 0 : { *(.debug_loc); } :debug
-	.debug_pubnames 0 : { *(.debug_pubnames); } :debug
-	.debug_pubtypes 0 : { *(.debug_pubtypes); } :debug
-	.debug_ranges 0 : { *(.debug_ranges); } :debug
-	.debug_str 0 : { *(.debug_str); } :debug
-#endif
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/srv/loader/arch/arm32/_link.ld.in
===================================================================
--- uspace/srv/loader/arch/arm32/_link.ld.in	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/*
- * The only difference from _link.ld.in for regular statically-linked apps
- * is the base address.
- */
-
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	interp PT_INTERP;
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	.interp : {
-		*(.interp);
-	} : interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-	. = . + 0x1000;
-	
-	.data : {
-		*(.opd);
-		*(.data .data.*);
-		*(.sdata);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.bss : {
-		*(.sbss);
-		*(.scommon);
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/srv/loader/arch/ia32/_link.ld.in
===================================================================
--- uspace/srv/loader/arch/ia32/_link.ld.in	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*
- * The difference from _link.ld.in for regular statically-linked apps
- * is the base address and the special interp section.
- */
-
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	interp PT_INTERP;
-	text PT_LOAD FILEHDR PHDRS FLAGS(5);
-	data PT_LOAD FLAGS(6);
-	debug PT_NOTE;
-}
-
-SECTIONS {
-	.interp : {
-		*(.interp);
-	} :interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-	. = . + 0x1000;
-	
-	.data : {
-		*(.data);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		*(.gnu.linkonce.tb.*);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.bss : {
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-#ifdef CONFIG_LINE_DEBUG
-	.comment 0 : { *(.comment); } :debug
-	.debug_abbrev 0 : { *(.debug_abbrev); } :debug
-	.debug_aranges 0 : { *(.debug_aranges); } :debug
-	.debug_info 0 : { *(.debug_info); } :debug
-	.debug_line 0 : { *(.debug_line); } :debug
-	.debug_loc 0 : { *(.debug_loc); } :debug
-	.debug_pubnames 0 : { *(.debug_pubnames); } :debug
-	.debug_pubtypes 0 : { *(.debug_pubtypes); } :debug
-	.debug_ranges 0 : { *(.debug_ranges); } :debug
-	.debug_str 0 : { *(.debug_str); } :debug
-#endif
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/srv/loader/arch/ia64/_link.ld.in
===================================================================
--- uspace/srv/loader/arch/ia64/_link.ld.in	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,61 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	interp PT_INTERP;
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	.interp : {
-		*(.interp);
-	} :interp
-	
-	. = 0x800000000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-	. = . + 0x4000;
-	
-	.got : {
-		/* Tell the linker where we expect GP to point. */
-		__gp = .;
-		*(.got .got.*);
-	} :data
-	
-	.data : {
-		*(.opd);
-		*(.data .data.*);
-		*(.sdata);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.bss : {
-		*(.sbss);
-		*(.scommon);
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/srv/loader/arch/mips32/_link.ld.in
===================================================================
--- uspace/srv/loader/arch/mips32/_link.ld.in	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/*
- * The only difference from _link.ld.in for regular statically-linked apps
- * is the base address.
- */
-
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	interp PT_INTERP;
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	.interp : {
-		*(.interp);
-	} :interp
-	
-	. = 0x70004000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-	. = . + 0x4000;
-	
-	.data : {
-		*(.data);
-		*(.data.rel*);
-	} :data
-	
-	.got : {
-		_gp = .;
-		*(.got);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-	} :data
-	
-	.tbss : {
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss));
-	
-	.sbss : {
-		*(.scommon);
-		*(.sbss);
-	}
-	
-	.bss : {
-		*(.bss);
-		*(COMMON);
-	} :data
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/srv/loader/arch/mips32eb
===================================================================
--- uspace/srv/loader/arch/mips32eb	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,1 +1,0 @@
-mips32
Index: uspace/srv/loader/arch/ppc32/_link.ld.in
===================================================================
--- uspace/srv/loader/arch/ppc32/_link.ld.in	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * The only difference from _link.ld.in for regular statically-linked apps
- * is the base address.
- */
-
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	interp PT_INTERP;
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	.interp : {
-		*(.interp);
-	} :interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-	. = . + 0x1000;
-	
-	.data : {
-		*(.data);
-		*(.sdata);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.bss : {
-		*(.sbss);
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/srv/loader/arch/sparc64/_link.ld.in
===================================================================
--- uspace/srv/loader/arch/sparc64/_link.ld.in	(revision fcfd002df391f9e7b6107b57c54439dbfbe24af8)
+++ 	(revision )
@@ -1,58 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	interp PT_INTERP;
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	.interp : {
-		*(.interp);
-	} :interp
-	
-	. = 0x70004000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-	. = . + 0x4000;
-	
-	.got : {
-		 _gp = .;
-		 *(.got*);
-	} :data
-	
-	.data : {
-		*(.data);
-		*(.sdata);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.bss : {
-		*(.sbss);
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
