]> git.neil.brown.name Git - history.git/commitdiff
kbuild: Common rule for preprocessing vmlinux.lds
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Fri, 16 Aug 2002 17:19:08 +0000 (12:19 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Fri, 16 Aug 2002 17:19:08 +0000 (12:19 -0500)
Some archs use the C preprocessor to adapt their vmlinux.lds script.
Introduce a common rule for these arch/*/Makefile's to use.

Makefile
arch/alpha/Makefile
arch/alpha/vmlinux.lds.S [new file with mode: 0644]
arch/alpha/vmlinux.lds.in [deleted file]
arch/ia64/Makefile
arch/mips64/Makefile
arch/mips64/ld.script.elf32.S [deleted file]
arch/mips64/vmlinux.lds.S [new file with mode: 0644]
arch/parisc/Makefile
arch/s390x/Makefile
arch/sh/Makefile

index 6f0520e81d29ad3745718ab88228603303052def..76c8fbe45b133c7849b88f8290bc466238edfe0a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -315,6 +315,12 @@ $(SUBDIRS): .hdepend prepare
 prepare: include/linux/version.h include/asm include/config/MARKER
        @echo '  Starting the build. KBUILD_BUILTIN=$(KBUILD_BUILTIN) KBUILD_MODULES=$(KBUILD_MODULES)'
 
+#      This can be used by arch/$ARCH/Makefile to preprocess
+#      their vmlinux.lds.S file
+
+arch/$ARCH/vmlinux.lds.s: arch/$ARCH/vmlinux.lds.S
+       $(CPP) $(CPPFLAGS) $(CPPFLAGS_$@) -P -C -U$(ARCH) $< -o $@
+
 # Single targets
 # ---------------------------------------------------------------------------
 
index 78dbb2696968f09f86979e12ca72d2874dca2ccf..c22b4900075f324b509121b08e5447eda0fda8c4 100644 (file)
@@ -10,7 +10,7 @@
 
 NM := $(NM) -B
 
-LDFLAGS_vmlinux = -static -T arch/alpha/vmlinux.lds -N #-relax
+LDFLAGS_vmlinux = -static -T arch/alpha/vmlinux.lds.s -N #-relax
 CFLAGS := $(CFLAGS) -pipe -mno-fp-regs -ffixed-8
 
 # Determine if we can use the BWX instructions with GAS.
@@ -124,13 +124,9 @@ archclean:
        @$(MAKEBOOT) clean
 
 archmrproper:
-       rm -f arch/alpha/vmlinux.lds
        rm -f include/asm-alpha/asm_offsets.h
 
-vmlinux: arch/alpha/vmlinux.lds
-
-arch/alpha/vmlinux.lds: arch/alpha/vmlinux.lds.in
-       $(CPP) $(CPPFLAGS) -xc -P arch/alpha/vmlinux.lds.in -o arch/alpha/vmlinux.lds
+vmlinux: arch/alpha/vmlinux.lds.s
 
 bootpfile:
        @$(MAKEBOOT) bootpfile
diff --git a/arch/alpha/vmlinux.lds.S b/arch/alpha/vmlinux.lds.S
new file mode 100644 (file)
index 0000000..8527228
--- /dev/null
@@ -0,0 +1,123 @@
+#include <linux/config.h>
+
+OUTPUT_FORMAT("elf64-alpha")
+ENTRY(__start)
+PHDRS { kernel PT_LOAD ; }
+jiffies = jiffies_64;
+SECTIONS
+{
+#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
+  . = 0xfffffc0000310000;
+#else
+  . = 0xfffffc0000810000;
+#endif
+
+  .text : {
+       _text = .;
+       *(.text)
+       _etext = .;
+  } :kernel
+
+  /* Exception table */
+  __ex_table ALIGN(16) : {
+       __start___ex_table = .;
+       *(__ex_table)
+       __stop___ex_table = .;
+  }
+
+  /* Kernel symbol table */
+  __ksymtab ALIGN(8) : {
+       __start___ksymtab = .;
+       *(__ksymtab)
+       __stop___ksymtab = .;
+  }
+  .kstrtab : { *(.kstrtab) }
+
+  /* Startup code */
+  .text.init ALIGN(8192) : {
+       __init_begin = .;
+       *(.text.init)
+  }
+  .data.init : { *(.data.init) }
+
+  .setup.init ALIGN(16): {
+       __setup_start = .;
+       *(.setup.init)
+       __setup_end = .;
+  }
+
+  .initcall.init ALIGN(8): {
+       __initcall_start = .;
+       *(.initcall1.init) 
+       *(.initcall2.init) 
+       *(.initcall3.init) 
+       *(.initcall4.init) 
+       *(.initcall5.init) 
+       *(.initcall6.init) 
+       *(.initcall7.init)
+       __initcall_end = .;
+  }
+
+  . = ALIGN(64);
+  __per_cpu_start = .;
+  .data.percpu  : { *(.data.percpu) }
+  __per_cpu_end = .;
+
+  /* The initial task and kernel stack */
+  .data.init_thread ALIGN(2*8192) : {
+       __init_end = .;
+       *(.data.init_thread)
+  }
+
+  /* Global data */
+  .data.cacheline_aligned : {
+       _data = .;
+       *(.data.cacheline_aligned)
+  }
+  .rodata : { *(.rodata) *(.rodata.*) }
+  .data : { *(.data) CONSTRUCTORS }
+  .got : { *(.got) }
+  .sdata : {
+       *(.sdata)
+       _edata = .;
+  }
+
+  .sbss : {
+       __bss_start = .;
+       *(.sbss) *(.scommon)
+  }
+  .bss : {
+       *(.bss) *(COMMON)
+       __bss_stop = .;
+       _end = .;
+  }
+
+  .mdebug 0 : { *(.mdebug) }
+  .note 0 : { *(.note) }
+  .comment 0 : { *(.comment) }
+
+  /* DWARF 1 */
+  .debug          0 : { *(.debug) }
+  .line           0 : { *(.line) }
+  /* GNU DWARF 1 extensions */
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }
+  .debug_sfnames  0 : { *(.debug_sfnames) }
+  /* DWARF 1.1 and DWARF 2 */
+  .debug_aranges  0 : { *(.debug_aranges) }
+  .debug_pubnames 0 : { *(.debug_pubnames) }
+  /* DWARF 2 */
+  .debug_info     0 : { *(.debug_info) }
+  .debug_abbrev   0 : { *(.debug_abbrev) }
+  .debug_line     0 : { *(.debug_line) }
+  .debug_frame    0 : { *(.debug_frame) }
+  .debug_str      0 : { *(.debug_str) }
+  .debug_loc      0 : { *(.debug_loc) }
+  .debug_macinfo  0 : { *(.debug_macinfo) }
+  /* SGI/MIPS DWARF 2 extensions */
+  .debug_weaknames 0 : { *(.debug_weaknames) }
+  .debug_funcnames 0 : { *(.debug_funcnames) }
+  .debug_typenames 0 : { *(.debug_typenames) }
+  .debug_varnames  0 : { *(.debug_varnames) }
+
+  /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
+}
diff --git a/arch/alpha/vmlinux.lds.in b/arch/alpha/vmlinux.lds.in
deleted file mode 100644 (file)
index 8527228..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-#include <linux/config.h>
-
-OUTPUT_FORMAT("elf64-alpha")
-ENTRY(__start)
-PHDRS { kernel PT_LOAD ; }
-jiffies = jiffies_64;
-SECTIONS
-{
-#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
-  . = 0xfffffc0000310000;
-#else
-  . = 0xfffffc0000810000;
-#endif
-
-  .text : {
-       _text = .;
-       *(.text)
-       _etext = .;
-  } :kernel
-
-  /* Exception table */
-  __ex_table ALIGN(16) : {
-       __start___ex_table = .;
-       *(__ex_table)
-       __stop___ex_table = .;
-  }
-
-  /* Kernel symbol table */
-  __ksymtab ALIGN(8) : {
-       __start___ksymtab = .;
-       *(__ksymtab)
-       __stop___ksymtab = .;
-  }
-  .kstrtab : { *(.kstrtab) }
-
-  /* Startup code */
-  .text.init ALIGN(8192) : {
-       __init_begin = .;
-       *(.text.init)
-  }
-  .data.init : { *(.data.init) }
-
-  .setup.init ALIGN(16): {
-       __setup_start = .;
-       *(.setup.init)
-       __setup_end = .;
-  }
-
-  .initcall.init ALIGN(8): {
-       __initcall_start = .;
-       *(.initcall1.init) 
-       *(.initcall2.init) 
-       *(.initcall3.init) 
-       *(.initcall4.init) 
-       *(.initcall5.init) 
-       *(.initcall6.init) 
-       *(.initcall7.init)
-       __initcall_end = .;
-  }
-
-  . = ALIGN(64);
-  __per_cpu_start = .;
-  .data.percpu  : { *(.data.percpu) }
-  __per_cpu_end = .;
-
-  /* The initial task and kernel stack */
-  .data.init_thread ALIGN(2*8192) : {
-       __init_end = .;
-       *(.data.init_thread)
-  }
-
-  /* Global data */
-  .data.cacheline_aligned : {
-       _data = .;
-       *(.data.cacheline_aligned)
-  }
-  .rodata : { *(.rodata) *(.rodata.*) }
-  .data : { *(.data) CONSTRUCTORS }
-  .got : { *(.got) }
-  .sdata : {
-       *(.sdata)
-       _edata = .;
-  }
-
-  .sbss : {
-       __bss_start = .;
-       *(.sbss) *(.scommon)
-  }
-  .bss : {
-       *(.bss) *(COMMON)
-       __bss_stop = .;
-       _end = .;
-  }
-
-  .mdebug 0 : { *(.mdebug) }
-  .note 0 : { *(.note) }
-  .comment 0 : { *(.comment) }
-
-  /* DWARF 1 */
-  .debug          0 : { *(.debug) }
-  .line           0 : { *(.line) }
-  /* GNU DWARF 1 extensions */
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  /* DWARF 1.1 and DWARF 2 */
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  /* DWARF 2 */
-  .debug_info     0 : { *(.debug_info) }
-  .debug_abbrev   0 : { *(.debug_abbrev) }
-  .debug_line     0 : { *(.debug_line) }
-  .debug_frame    0 : { *(.debug_frame) }
-  .debug_str      0 : { *(.debug_str) }
-  .debug_loc      0 : { *(.debug_loc) }
-  .debug_macinfo  0 : { *(.debug_macinfo) }
-  /* SGI/MIPS DWARF 2 extensions */
-  .debug_weaknames 0 : { *(.debug_weaknames) }
-  .debug_funcnames 0 : { *(.debug_funcnames) }
-  .debug_typenames 0 : { *(.debug_typenames) }
-  .debug_varnames  0 : { *(.debug_varnames) }
-
-  /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
-}
index d74dc8c0da46602ff7aadd33e85e71bb5541fb4d..7334569d5d8ebece8e219199c5e14d5678a2081a 100644 (file)
@@ -14,7 +14,7 @@ AWK := awk
 export AWK
 
 OBJCOPYFLAGS := --strip-all
-LDFLAGS_vmlinux := -static -T arch/$(ARCH)/vmlinux.lds
+LDFLAGS_vmlinux := -static -T arch/$(ARCH)/vmlinux.lds.s
 AFLAGS_KERNEL := -mconstant-gp
 EXTRA  =
 
@@ -94,10 +94,9 @@ LIBS := $(TOPDIR)/arch/$(ARCH)/lib/lib.a $(LIBS) \
 
 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
 
-vmlinux: arch/$(ARCH)/vmlinux.lds
+vmlinux: arch/$(ARCH)/vmlinux.lds.s
 
-arch/$(ARCH)/vmlinux.lds: arch/$(ARCH)/vmlinux.lds.S FORCE
-       $(CPP) $(AFLAGS) -C -P -traditional $< > $@
+CPPFLAGS_arch/ia64/vmlinux.lds.s := -traditional
 
 compressed: vmlinux
        $(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux-tmp
@@ -124,7 +123,6 @@ archclean:
        @$(MAKEBOOT) clean
 
 archmrproper:
-       rm -f arch/$(ARCH)/vmlinux.lds
        @$(MAKE) -C arch/$(ARCH)/tools mrproper
 
 bootpfile:
index 3eff5b561763c99301418868671b20dbcc54926d..3ec2138f944b292908660557af049e2cb06f96ae 100644 (file)
@@ -117,7 +117,7 @@ endif
 #
 ifdef CONFIG_BOOT_ELF32
 CFLAGS += -Wa,-32
-LDFLAGS_vmlinux += -T arch/mips64/ld.script.elf32
+LDFLAGS_vmlinux += -T arch/mips64/vmlinux.lds.s
 endif
 #
 # The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
@@ -125,7 +125,7 @@ endif
 #
 ifdef CONFIG_BOOT_ELF64
 CFLAGS += -Wa,-32
-LDFLAGS_vmlinux += -T arch/mips64/ld.script.elf32
+LDFLAGS_vmlinux += -T arch/mips64/vmlinux.lds.s
 #AS += -64
 #LDFLAGS += -m elf64bmip
 #LDFLAGS_vmlinux += -T arch/mips64/ld.script.elf64
@@ -147,9 +147,9 @@ else
 64bit-bfd = elf64-bigmips
 endif
 
-vmlinux: arch/mips64/ld.script.elf32
-arch/mips64/ld.script.elf32: arch/mips64/ld.script.elf32.S
-       $(CPP) $(CPPFLAGS) -C -P -imacros $(srctree)/include/asm-mips64/sn/mapped_kernel.h -Umips $< > $@
+vmlinux: arch/mips64/vmlinux.lds.s
+
+CPPFLAGS_arch/mips64/vmlinux.lds.s := -imacros $(srctree)/include/asm-mips64/sn/mapped_kernel.h
 
 ifdef CONFIG_MAPPED_KERNEL
 vmlinux.64: vmlinux
@@ -170,7 +170,6 @@ zdisk: vmlinux
 archclean:
        @$(MAKEBOOT) clean
        $(MAKE) -C arch/$(ARCH)/tools clean
-       rm -f vmlinux.64 arch/$(ARCH)/ld.script.elf32
 
 archmrproper:
        @$(MAKEBOOT) mrproper
diff --git a/arch/mips64/ld.script.elf32.S b/arch/mips64/ld.script.elf32.S
deleted file mode 100644 (file)
index 4ffd13a..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-OUTPUT_ARCH(mips)
-ENTRY(kernel_entry)
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  .init          : { *(.init)          } =0
-  .text      :
-  {
-    *(.text)
-    *(.rodata)
-    *(.rodata.*)
-    *(.rodata1)
-    /* .gnu.warning sections are handled specially by elf32.em.  */
-    *(.gnu.warning)
-  } =0
-  .kstrtab : { *(.kstrtab) }
-
-  . = ALIGN(16);               /* Exception table */
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  __start___dbe_table = .;     /* Exception table for data bus errors */
-  __dbe_table : { *(__dbe_table) }
-  __stop___dbe_table = .;
-
-  _etext = .;
-
-  . = ALIGN(16384);
-  . = . + MAPPED_OFFSET;       /* for CONFIG_MAPPED_KERNEL */
-  .data.init_task : { *(.data.init_task) }
-
-  /* Startup code */
-  . = ALIGN(4096);
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(16);
-  __setup_start = .;
-  .setup.init : { *(.setup.init) }
-  __setup_end = .;
-  __initcall_start = .;
-  .initcall.init : {
-       *(.initcall1.init) 
-       *(.initcall2.init) 
-       *(.initcall3.init) 
-       *(.initcall4.init) 
-       *(.initcall5.init) 
-       *(.initcall6.init) 
-       *(.initcall7.init)
-  }
-  __initcall_end = .;
-  . = ALIGN(4096);     /* Align double page for init_task_union */
-  __init_end = .;
-
-  . = ALIGN(4096);
-  .data.page_aligned : { *(.data.idt) }
-
-  . = ALIGN(32);
-  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
-
-  .fini      : { *(.fini)    } =0
-  .reginfo : { *(.reginfo) }
-  /* Adjust the address for the data segment.  We want to adjust up to
-     the same address within the page on the next page up.  It would
-     be more correct to do this:
-       . = .;
-     The current expression does not correctly handle the case of a
-     text segment ending precisely at the end of a page; it causes the
-     data segment to skip a page.  The above expression does not have
-     this problem, but it will currently (2/95) cause BFD to allocate
-     a single segment, combining both text and data, for this case.
-     This will prevent the text segment from being shared among
-     multiple executions of the program; I think that is more
-     important than losing a page of the virtual address space (note
-     that no actual memory is lost; the page which is skipped can not
-     be referenced).  */
-  . = .;
-  .data    :
-  {
-    _fdata = . ;
-    *(.data)
-    CONSTRUCTORS
-  }
-  .data1   : { *(.data1) }
-  .lit8 : { *(.lit8) }
-  .lit4 : { *(.lit4) }
-  .ctors         : { *(.ctors)   }
-  .dtors         : { *(.dtors)   }
-  .got           : { *(.got.plt) *(.got) }
-  .dynamic       : { *(.dynamic) }
-  /* We want the small data sections together, so single-instruction offsets
-     can access them all, and initialized data all before uninitialized, so
-     we can shorten the on-disk segment size.  */
-  .sdata     : { *(.sdata) }
-  _edata  =  .;
-
-  .sbss      : { *(.sbss) *(.scommon) }
-  .bss       :
-  {
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  _end = . ;
-  }
-
-  /* Sections to be discarded */
-  /DISCARD/ : 
-  {
-        *(.text.exit)
-        *(.data.exit)
-        *(.exitcall.exit)
-  }
-
-  /* These are needed for ELF backends which have not yet been
-     converted to the new style linker.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  /* DWARF debug sections.
-     Symbols in the .debug DWARF section are relative to the beginning of the
-     section so we begin .debug at 0.  It's not clear yet what needs to happen
-     for the others.   */
-  .debug          0 : { *(.debug) }
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  .line           0 : { *(.line) }
-  /* These must appear regardless of  .  */
-  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
-  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-}
diff --git a/arch/mips64/vmlinux.lds.S b/arch/mips64/vmlinux.lds.S
new file mode 100644 (file)
index 0000000..4ffd13a
--- /dev/null
@@ -0,0 +1,132 @@
+OUTPUT_ARCH(mips)
+ENTRY(kernel_entry)
+SECTIONS
+{
+  /* Read-only sections, merged into text segment: */
+  .init          : { *(.init)          } =0
+  .text      :
+  {
+    *(.text)
+    *(.rodata)
+    *(.rodata.*)
+    *(.rodata1)
+    /* .gnu.warning sections are handled specially by elf32.em.  */
+    *(.gnu.warning)
+  } =0
+  .kstrtab : { *(.kstrtab) }
+
+  . = ALIGN(16);               /* Exception table */
+  __start___ex_table = .;
+  __ex_table : { *(__ex_table) }
+  __stop___ex_table = .;
+
+  __start___dbe_table = .;     /* Exception table for data bus errors */
+  __dbe_table : { *(__dbe_table) }
+  __stop___dbe_table = .;
+
+  _etext = .;
+
+  . = ALIGN(16384);
+  . = . + MAPPED_OFFSET;       /* for CONFIG_MAPPED_KERNEL */
+  .data.init_task : { *(.data.init_task) }
+
+  /* Startup code */
+  . = ALIGN(4096);
+  __init_begin = .;
+  .text.init : { *(.text.init) }
+  .data.init : { *(.data.init) }
+  . = ALIGN(16);
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
+  __initcall_start = .;
+  .initcall.init : {
+       *(.initcall1.init) 
+       *(.initcall2.init) 
+       *(.initcall3.init) 
+       *(.initcall4.init) 
+       *(.initcall5.init) 
+       *(.initcall6.init) 
+       *(.initcall7.init)
+  }
+  __initcall_end = .;
+  . = ALIGN(4096);     /* Align double page for init_task_union */
+  __init_end = .;
+
+  . = ALIGN(4096);
+  .data.page_aligned : { *(.data.idt) }
+
+  . = ALIGN(32);
+  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
+  .fini      : { *(.fini)    } =0
+  .reginfo : { *(.reginfo) }
+  /* Adjust the address for the data segment.  We want to adjust up to
+     the same address within the page on the next page up.  It would
+     be more correct to do this:
+       . = .;
+     The current expression does not correctly handle the case of a
+     text segment ending precisely at the end of a page; it causes the
+     data segment to skip a page.  The above expression does not have
+     this problem, but it will currently (2/95) cause BFD to allocate
+     a single segment, combining both text and data, for this case.
+     This will prevent the text segment from being shared among
+     multiple executions of the program; I think that is more
+     important than losing a page of the virtual address space (note
+     that no actual memory is lost; the page which is skipped can not
+     be referenced).  */
+  . = .;
+  .data    :
+  {
+    _fdata = . ;
+    *(.data)
+    CONSTRUCTORS
+  }
+  .data1   : { *(.data1) }
+  .lit8 : { *(.lit8) }
+  .lit4 : { *(.lit4) }
+  .ctors         : { *(.ctors)   }
+  .dtors         : { *(.dtors)   }
+  .got           : { *(.got.plt) *(.got) }
+  .dynamic       : { *(.dynamic) }
+  /* We want the small data sections together, so single-instruction offsets
+     can access them all, and initialized data all before uninitialized, so
+     we can shorten the on-disk segment size.  */
+  .sdata     : { *(.sdata) }
+  _edata  =  .;
+
+  .sbss      : { *(.sbss) *(.scommon) }
+  .bss       :
+  {
+   *(.dynbss)
+   *(.bss)
+   *(COMMON)
+  _end = . ;
+  }
+
+  /* Sections to be discarded */
+  /DISCARD/ : 
+  {
+        *(.text.exit)
+        *(.data.exit)
+        *(.exitcall.exit)
+  }
+
+  /* These are needed for ELF backends which have not yet been
+     converted to the new style linker.  */
+  .stab 0 : { *(.stab) }
+  .stabstr 0 : { *(.stabstr) }
+  /* DWARF debug sections.
+     Symbols in the .debug DWARF section are relative to the beginning of the
+     section so we begin .debug at 0.  It's not clear yet what needs to happen
+     for the others.   */
+  .debug          0 : { *(.debug) }
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }
+  .debug_aranges  0 : { *(.debug_aranges) }
+  .debug_pubnames 0 : { *(.debug_pubnames) }
+  .debug_sfnames  0 : { *(.debug_sfnames) }
+  .line           0 : { *(.line) }
+  /* These must appear regardless of  .  */
+  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
+  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+}
index 4beccadb820293aa504493326c6cec5b77ade3cf..f28454eb58d19c0b66b2a0362d6635677b3260f1 100644 (file)
@@ -19,7 +19,6 @@
 
 FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align 
 
-CPP=$(CC) -E
 OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
 LDFLAGS_vmlinux =-T arch/parisc/vmlinux.lds
 
index ad6a4427b804ced1bfd388d813520b3715b7e61f..31cb67c8a93f6b441d2c22f491415352ef13491f 100644 (file)
@@ -14,7 +14,6 @@
 #
 
 LDFLAGS                := -m elf64_s390
-CPP=$(CC) -E
 OBJCOPYFLAGS   := -O binary
 ifeq ($(CONFIG_SHARED_KERNEL),y)
   LINKSCRIPT := arch/s390x/vmlinux-shared.lds
index 7e3582e2467fa91ca2f676328dd8859066ecbc1e..bc60c99f92304be063bdf877b84e0a7b8b3e32d8 100644 (file)
@@ -45,7 +45,7 @@ endif
 # error messages during linking.  Select a default linkscript if
 # none has been choosen above.
 #
-LINKSCRIPT    = arch/sh/vmlinux.lds
+LINKSCRIPT    = arch/sh/vmlinux.lds.s
 LDFLAGS_vmlinux     += -T $(word 1,$(LINKSCRIPT)) -e _stext
 
 ifdef LOADADDR
@@ -70,10 +70,9 @@ SUBDIRS += arch/sh/stboards
 CORE_FILES += arch/sh/stboards/stboards.o
 endif
 
-vmlinux: arch/sh/vmlinux.lds
+vmlinux: arch/sh/vmlinux.lds.s
 
-arch/sh/vmlinux.lds: arch/sh/vmlinux.lds.S FORCE
-       $(CPP) $(CPPFLAGS) -traditional -C -P -Ush $< > $@
+CPPFLAGS_arch/sh/vmlinux.lds.s := -traditional
 
 FORCE: ;
 
@@ -92,4 +91,4 @@ archclean:
 #      $(MAKE) -C arch/$(ARCH)/tools clean
 
 archmrproper:
-       rm -f arch/sh/vmlinux.lds
+