]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
8260: Cleanup for partial linking and --gc-sections
authorWolfgang Denk <wd@denx.de>
Wed, 24 Nov 2010 18:19:08 +0000 (19:19 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 27 Nov 2010 22:35:12 +0000 (23:35 +0100)
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
arch/powerpc/cpu/mpc8260/u-boot.lds
board/atc/ti113x.c
board/cogent/u-boot.lds
include/configs/cogent_mpc8260.h

index b8681e706d4caaa9d42b8c1036485dfdd2380307..ad2ce37f1bcae0243e94e30234c8e8366f34cc64 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * (C) Copyright 2001-2007
+ * (C) Copyright 2001-2010
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
  */
 
 OUTPUT_ARCH(powerpc)
  */
 
 OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)          }
-  .dynsym        : { *(.dynsym)                }
-  .dynstr        : { *(.dynstr)                }
-  .rel.text      : { *(.rel.text)              }
-  .rela.text     : { *(.rela.text)     }
-  .rel.data      : { *(.rel.data)              }
-  .rela.data     : { *(.rela.data)     }
-  .rel.rodata    : { *(.rel.rodata)    }
-  .rela.rodata   : { *(.rela.rodata)   }
-  .rel.got       : { *(.rel.got)               }
-  .rela.got      : { *(.rela.got)              }
-  .rel.ctors     : { *(.rel.ctors)     }
-  .rela.ctors    : { *(.rela.ctors)    }
-  .rel.dtors     : { *(.rel.dtors)     }
-  .rela.dtors    : { *(.rela.dtors)    }
-  .rel.bss       : { *(.rel.bss)               }
-  .rela.bss      : { *(.rela.bss)              }
-  .rel.plt       : { *(.rel.plt)               }
-  .rela.plt      : { *(.rela.plt)              }
-  .init          : { *(.init)  }
-  .plt : { *(.plt) }
   .text      :
   {
   .text      :
   {
-    arch/powerpc/cpu/mpc8260/start.o           (.text)
-    *(.text)
-    *(.got1)
+    arch/powerpc/cpu/mpc8260/start.o   (.text*)
+    *(.text*)
     . = ALIGN(16);
     . = ALIGN(16);
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xFFFFF000;
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xFFFFF000;
@@ -69,23 +40,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -111,9 +78,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
    *(COMMON)
    . = ALIGN(4);
   }
index 473bb10af774a9fee7a949f036700bf8a66b22cf..ff871f64f972a2c59b892634848028f482392d49 100644 (file)
@@ -468,7 +468,7 @@ static int i365_set_io_map (socket_info_t * s, struct pccard_io_map *io)
 
 /*====================================================================*/
 
 
 /*====================================================================*/
 
-int i82365_init (void)
+static int i82365_init (void)
 {
        u_int val;
        int i;
 {
        u_int val;
        int i;
@@ -545,7 +545,7 @@ int i82365_init (void)
        return 0;
 }
 
        return 0;
 }
 
-void i82365_exit (void)
+static void i82365_exit (void)
 {
        io.map = 0;
        io.flags = 0;
 {
        io.map = 0;
        io.flags = 0;
index b4c7a0ed6e225f343b7fc53d2d20986cfcd53301..42ed142ea2b4fa0e2796a00e9dca2730ecd02e7e 100644 (file)
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
  * MA 02111-1307 USA
  */
 
+#include <config.h>
 OUTPUT_ARCH(powerpc)
 
 SECTIONS
 OUTPUT_ARCH(powerpc)
 
 SECTIONS
@@ -29,9 +30,12 @@ SECTIONS
   . = + SIZEOF_HEADERS;
   .text      :
   {
   . = + SIZEOF_HEADERS;
   .text      :
   {
+#ifdef CONFIG_MPC8260
+    arch/powerpc/cpu/mpc8260/start.o   (.text*)
+#else
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-
+#endif
     *(.text*)
   }
   _etext = .;
     *(.text*)
   }
   _etext = .;
index d77af0defdff24fe8618d67251aa7cfbc1946f4d..2997f52a7522a72703519c4cec0a962e4e188778 100644 (file)
 #define CONFIG_CMD_KGDB
 
 #undef CONFIG_CMD_NET
 #define CONFIG_CMD_KGDB
 
 #undef CONFIG_CMD_NET
-
+#undef CONFIG_CMD_NFS
 
 #ifdef DEBUG
 #define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */
 
 #ifdef DEBUG
 #define CONFIG_BOOTDELAY       -1      /* autoboot disabled            */