diff mbox

[U-Boot,1/6] ColdFire: Cleanup lds files for multiple defined symbols

Message ID 1316004267-23656-1-git-send-email-stany.marcel@novasys-ingenierie.com
State Superseded
Headers show

Commit Message

stany MARCEL Sept. 14, 2011, 12:44 p.m. UTC
Lds files cleened to remove multiple defined section and modified to
be compliant with --gc-sections added for ColdFire platform in a
previous patch.

Signed-off-by: Stany MARCEL <stany.marcel@novasys-ingenierie.com>
---
 board/BuS/EB+MCF-EV123/u-boot.lds    |   73 ++++++-------------------------
 board/cobra5272/u-boot.lds           |   69 ++++++------------------------
 board/esd/tasreg/u-boot.lds          |   69 +++++-------------------------
 board/freescale/m5235evb/u-boot.16   |   71 ++++++-------------------------
 board/freescale/m5235evb/u-boot.32   |   79 ++++++----------------------------
 board/freescale/m5249evb/u-boot.lds  |   68 +++++------------------------
 board/freescale/m5253evbe/u-boot.lds |   67 +++++-----------------------
 board/freescale/m5271evb/u-boot.lds  |   66 +++++-----------------------
 board/freescale/m5272c3/u-boot.lds   |   67 +++++-----------------------
 board/freescale/m5275evb/u-boot.lds  |   68 ++++++-----------------------
 board/freescale/m5282evb/u-boot.lds  |   70 ++++++------------------------
 board/idmr/u-boot.lds                |   69 +++++-------------------------
 12 files changed, 150 insertions(+), 686 deletions(-)

Comments

Jin Zhengxiong-R64188 Sept. 16, 2011, 7:48 a.m. UTC | #1
> -----Original Message-----
> From: Stany MARCEL [mailto:stany.marcel@novasys-ingenierie.com]
> Sent: Wednesday, September 14, 2011 8:44 PM
> To: u-boot@lists.denx.de
> Cc: Jin Zhengxiong-R64188; Jin Zhengxiong-R64188; Stany MARCEL
> Subject: [PATCH 1/6] ColdFire: Cleanup lds files for multiple defined symbols
> 
> Lds files cleened to remove multiple defined section and modified to be
> compliant with --gc-sections added for ColdFire platform in a previous patch.
> 
> Signed-off-by: Stany MARCEL <stany.marcel@novasys-ingenierie.com>
> ---
>  board/BuS/EB+MCF-EV123/u-boot.lds    |   73 ++++++-------------------------
>  board/cobra5272/u-boot.lds           |   69 ++++++------------------------
>  board/esd/tasreg/u-boot.lds          |   69 +++++-------------------------
>  board/freescale/m5235evb/u-boot.16   |   71 ++++++-------------------------
>  board/freescale/m5235evb/u-boot.32   |   79 ++++++----------------------------
>  board/freescale/m5249evb/u-boot.lds  |   68 +++++------------------------
>  board/freescale/m5253evbe/u-boot.lds |   67 +++++-----------------------
>  board/freescale/m5271evb/u-boot.lds  |   66 +++++-----------------------
>  board/freescale/m5272c3/u-boot.lds   |   67 +++++-----------------------
>  board/freescale/m5275evb/u-boot.lds  |   68 ++++++-----------------------
>  board/freescale/m5282evb/u-boot.lds  |   70 ++++++------------------------
>  board/idmr/u-boot.lds                |   69 +++++-------------------------
>  12 files changed, 150 insertions(+), 686 deletions(-)
> 

[snip]

> diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds index
> da14807..6c2dfe8 100644
> --- a/board/cobra5272/u-boot.lds
> +++ b/board/cobra5272/u-boot.lds
> @@ -1,5 +1,5 @@
>  /*
> - * (C) Copyright 2000
> + * (C) Copyright 2000-2003
>   * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
[Jin Zhengxiong-R64188] Please double check the year for the Copyright, Thanks.

Best Regards,
Jason
Stany MARCEL Sept. 16, 2011, 8:11 p.m. UTC | #2
>> -----Original Message-----
>> From: Stany MARCEL [mailto:stany.marcel@novasys-ingenierie.com]
>> Sent: Wednesday, September 14, 2011 8:44 PM
>> To: u-boot@lists.denx.de
>> Cc: Jin Zhengxiong-R64188; Jin Zhengxiong-R64188; Stany MARCEL
>> Subject: [PATCH 1/6] ColdFire: Cleanup lds files for multiple defined symbols
>>
>> Lds files cleened to remove multiple defined section and modified to be
>> compliant with --gc-sections added for ColdFire platform in a previous patch.
>>
>> Signed-off-by: Stany MARCEL <stany.marcel@novasys-ingenierie.com>
>> ---
>>  board/BuS/EB+MCF-EV123/u-boot.lds    |   73 ++++++-------------------------
>>  board/cobra5272/u-boot.lds           |   69 ++++++------------------------
>>  board/esd/tasreg/u-boot.lds          |   69 +++++-------------------------
>>  board/freescale/m5235evb/u-boot.16   |   71 ++++++-------------------------
>>  board/freescale/m5235evb/u-boot.32   |   79 ++++++----------------------------
>>  board/freescale/m5249evb/u-boot.lds  |   68 +++++------------------------
>>  board/freescale/m5253evbe/u-boot.lds |   67 +++++-----------------------
>>  board/freescale/m5271evb/u-boot.lds  |   66 +++++-----------------------
>>  board/freescale/m5272c3/u-boot.lds   |   67 +++++-----------------------
>>  board/freescale/m5275evb/u-boot.lds  |   68 ++++++-----------------------
>>  board/freescale/m5282evb/u-boot.lds  |   70 ++++++------------------------
>>  board/idmr/u-boot.lds                |   69 +++++-------------------------
>>  12 files changed, 150 insertions(+), 686 deletions(-)
>>
>
> [snip]
>
>> diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds index
>> da14807..6c2dfe8 100644
>> --- a/board/cobra5272/u-boot.lds
>> +++ b/board/cobra5272/u-boot.lds
>> @@ -1,5 +1,5 @@
>>  /*
>> - * (C) Copyright 2000
>> + * (C) Copyright 2000-2003
>>   * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
> [Jin Zhengxiong-R64188] Please double check the year for the Copyright, Thanks.
>
> Best Regards,
> Jason
>

I merged with another files with this copyright years.

Each time a file is edited do I have to actualizes end dates ? Or
leave them as they are ?

Regards,

Stany
stany MARCEL Oct. 9, 2011, 8:16 p.m. UTC | #3
>>> From: Stany MARCEL [mailto:stany.marcel@novasys-ingenierie.com]
>>> Sent: Wednesday, September 14, 2011 8:44 PM
>>> To: u-boot@lists.denx.de
>>> Cc: Jin Zhengxiong-R64188; Jin Zhengxiong-R64188; Stany MARCEL
>>> Subject: [PATCH 1/6] ColdFire: Cleanup lds files for multiple defined symbols
>>>
>>> Lds files cleened to remove multiple defined section and modified to be
>>> compliant with --gc-sections added for ColdFire platform in a previous patch.
>>>
>>> Signed-off-by: Stany MARCEL <stany.marcel@novasys-ingenierie.com>
>>> ---
>>>  board/BuS/EB+MCF-EV123/u-boot.lds    |   73 ++++++-------------------------
>>>  board/cobra5272/u-boot.lds           |   69 ++++++------------------------
>>>  board/esd/tasreg/u-boot.lds          |   69 +++++-------------------------
>>>  board/freescale/m5235evb/u-boot.16   |   71 ++++++-------------------------
>>>  board/freescale/m5235evb/u-boot.32   |   79 ++++++----------------------------
>>>  board/freescale/m5249evb/u-boot.lds  |   68 +++++------------------------
>>>  board/freescale/m5253evbe/u-boot.lds |   67 +++++-----------------------
>>>  board/freescale/m5271evb/u-boot.lds  |   66 +++++-----------------------
>>>  board/freescale/m5272c3/u-boot.lds   |   67 +++++-----------------------
>>>  board/freescale/m5275evb/u-boot.lds  |   68 ++++++-----------------------
>>>  board/freescale/m5282evb/u-boot.lds  |   70 ++++++------------------------
>>>  board/idmr/u-boot.lds                |   69 +++++-------------------------
>>>  12 files changed, 150 insertions(+), 686 deletions(-)
>>>
>>
>> [snip]
>>
>>> diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds index
>>> da14807..6c2dfe8 100644
>>> --- a/board/cobra5272/u-boot.lds
>>> +++ b/board/cobra5272/u-boot.lds
>>> @@ -1,5 +1,5 @@
>>>  /*
>>> - * (C) Copyright 2000
>>> + * (C) Copyright 2000-2003
>>>   * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
>> [Jin Zhengxiong-R64188] Please double check the year for the Copyright, Thanks.
>>
>> Best Regards,
>> Jason
>>
>
> I merged with another files with this copyright years.
>
> Each time a file is edited do I have to actualizes end dates ? Or
> leave them as they are ?
>
> Regards,
>
> Stany
>

Hello,

As I've got no response I write a new message.

Regards,
Jin Zhengxiong-R64188 Oct. 12, 2011, 3:52 a.m. UTC | #4
> >>
> >>> diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds
> >>> index
> >>> da14807..6c2dfe8 100644
> >>> --- a/board/cobra5272/u-boot.lds
> >>> +++ b/board/cobra5272/u-boot.lds
> >>> @@ -1,5 +1,5 @@
> >>>  /*
> >>> - * (C) Copyright 2000
> >>> + * (C) Copyright 2000-2003
> >>>   * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
> >> [Jin Zhengxiong-R64188] Please double check the year for the Copyright,
> Thanks.
> >>
> >> Best Regards,
> >> Jason
> >>
> >
> > I merged with another files with this copyright years.
> >
> > Each time a file is edited do I have to actualizes end dates ? Or
> > leave them as they are ?
> >
> > Regards,
> >
> > Stany
> >
> 
> Hello,
> 
> As I've got no response I write a new message.
> 
> Regards,
> 
> --
> Stany

[Jin Zhengxiong-R64188] Then why you update it to 2000-2003?

Jason
Stany MARCEL Oct. 12, 2011, 7:22 a.m. UTC | #5
>> >>
>> >>> diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds
>> >>> index
>> >>> da14807..6c2dfe8 100644
>> >>> --- a/board/cobra5272/u-boot.lds
>> >>> +++ b/board/cobra5272/u-boot.lds
>> >>> @@ -1,5 +1,5 @@
>> >>>  /*
>> >>> - * (C) Copyright 2000
>> >>> + * (C) Copyright 2000-2003
>> >>>   * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
>> >> [Jin Zhengxiong-R64188] Please double check the year for the Copyright,
>> Thanks.
>> >>
>> >> Best Regards,
>> >> Jason
>> >>
>> >
>> > I merged with another files with this copyright years.
>> >
>> > Each time a file is edited do I have to actualizes end dates ? Or
>> > leave them as they are ?
>> >
>> > Regards,
>> >
>> > Stany
>> >
>> 
>> Hello,
>> 
>> As I've got no response I write a new message.
>> 
>> Regards,
>> 
>> --
>> Stany
>
>[Jin Zhengxiong-R64188] Then why you update it to 2000-2003?
>
>Jason

It's a result to a merge operation, but my previous question without answer is :

Each time a file is edited do I have to actualizes end dates ? Or leave them as they are ?

And so do I revert to the previous dates or not in my patch.

Regards,
Wolfgang Denk Oct. 13, 2011, 7:58 p.m. UTC | #6
Dear "Stany MARCEL",

In message <1512C13C0C5EA947AE50B9B9AC314F4701B00D83@ATLAS.pactenovation.fr> you wrote:
> 
> Each time a file is edited do I have to actualizes end dates ? Or leave them as they are ?

If the file has a copyright entry for yourself, you would udate this
to include the current calendar year.  Never touch copyright entries
of other persons or entities.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/board/BuS/EB+MCF-EV123/u-boot.lds b/board/BuS/EB+MCF-EV123/u-boot.lds
index e0359e3..4ba1964 100644
--- a/board/BuS/EB+MCF-EV123/u-boot.lds
+++ b/board/BuS/EB+MCF-EV123/u-boot.lds
@@ -22,52 +22,14 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o	(.text)
-    common/dlmalloc.o	(.text)
-    lib/string.o	(.text)
-    lib/vsprintf.o	(.text)
-    lib/crc32.o	(.text)
-    lib/zlib.o	(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
-/*    . = env_offset; */
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
@@ -75,43 +37,39 @@  SECTIONS
   {
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
   _erotext = .;
   PROVIDE (erotext = .);
-    .reloc   :
+
+  .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
 
+  . = .;
   __u_boot_cmd_start = .;
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
+  . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
   __stop___ex_table = .;
@@ -124,12 +82,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds
index da14807..6c2dfe8 100644
--- a/board/cobra5272/u-boot.lds
+++ b/board/cobra5272/u-boot.lds
@@ -1,5 +1,5 @@ 
 /*
- * (C) Copyright 2000
+ * (C) Copyright 2000-2003
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -22,51 +22,17 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-    arch/m68k/cpu/mcf52x2/start.o		(.text)
-    arch/m68k/cpu/mcf52x2/cpu_init.o	(.text)
-    arch/m68k/lib/traps.o		(.text)
-    arch/m68k/cpu/mcf52x2/interrupts.o	(.text)
-    common/dlmalloc.o		(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o	(.text)
+    common/env_embedded.o      (.text)
 
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
@@ -74,9 +40,6 @@  SECTIONS
   {
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -86,24 +49,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -113,7 +72,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -127,12 +85,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/esd/tasreg/u-boot.lds b/board/esd/tasreg/u-boot.lds
index 27a6b93..f697ccd 100644
--- a/board/esd/tasreg/u-boot.lds
+++ b/board/esd/tasreg/u-boot.lds
@@ -22,62 +22,21 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o		(.text)
-    arch/m68k/lib/traps.o		(.text)
-    arch/m68k/cpu/mcf52x2/interrupts.o	(.text)
-    common/dlmalloc.o		(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
-    . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o	(.text)
-
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
   .rodata    :
   {
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -87,24 +46,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -114,7 +69,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -128,12 +82,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/freescale/m5235evb/u-boot.16 b/board/freescale/m5235evb/u-boot.16
index 657cd9d..d39e734 100644
--- a/board/freescale/m5235evb/u-boot.16
+++ b/board/freescale/m5235evb/u-boot.16
@@ -22,63 +22,24 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf523x/start.o		(.text)
-    arch/m68k/cpu/mcf523x/cpu_init.o	(.text)
-    arch/m68k/lib/traps.o		(.text)
-    arch/m68k/lib/interrupts.o	(.text)
-    common/dlmalloc.o		(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf523x/start.o		(.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o	(.text)
+    common/env_embedded.o      (.text)
 
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
   .rodata    :
   {
-    *(.rodata)
-    *(.rodata1)
+    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -88,24 +49,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -115,7 +72,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -129,12 +85,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/freescale/m5235evb/u-boot.32 b/board/freescale/m5235evb/u-boot.32
index 1f91994..d39e734 100644
--- a/board/freescale/m5235evb/u-boot.32
+++ b/board/freescale/m5235evb/u-boot.32
@@ -22,71 +22,24 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf523x/start.o		(.text)
-    arch/m68k/cpu/mcf523x/cpu.o		(.text)
-    arch/m68k/cpu/mcf523x/cpu_init.o	(.text)
-    arch/m68k/cpu/mcf523x/interrupts.o	(.text)
-    arch/m68k/cpu/mcf523x/speed.o		(.text)
-    arch/m68k/lib/libm68k.o		(.text)
-    common/dlmalloc.o		(.text)
-    common/cmd_bootm.o		(.text)
-    common/cmd_flash.o		(.text)
-    common/cmd_elf.o		(.text)
-    common/cmd_mem.o		(.text)
-    common/console.o		(.text)
-    common/main.o		(.text)
-    lib/libgeneric.o	(.text)
+    arch/m68k/cpu/mcf523x/start.o		(.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o	(.text)
+    common/env_embedded.o      (.text)
 
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
   .rodata    :
   {
-    *(.rodata)
-    *(.rodata1)
+    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -96,24 +49,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -123,7 +72,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -137,12 +85,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/freescale/m5249evb/u-boot.lds b/board/freescale/m5249evb/u-boot.lds
index 27a6b93..c4039ed 100644
--- a/board/freescale/m5249evb/u-boot.lds
+++ b/board/freescale/m5249evb/u-boot.lds
@@ -22,62 +22,24 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o		(.text)
-    arch/m68k/lib/traps.o		(.text)
-    arch/m68k/cpu/mcf52x2/interrupts.o	(.text)
-    common/dlmalloc.o		(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o	(.text)
+    common/env_embedded.o      (.text)
 
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
   .rodata    :
   {
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -87,24 +49,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -114,7 +72,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -128,12 +85,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/freescale/m5253evbe/u-boot.lds b/board/freescale/m5253evbe/u-boot.lds
index 34aa73d..c4039ed 100644
--- a/board/freescale/m5253evbe/u-boot.lds
+++ b/board/freescale/m5253evbe/u-boot.lds
@@ -22,51 +22,17 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o		(.text)
-    arch/m68k/lib/traps.o		(.text)
-    arch/m68k/cpu/mcf52x2/interrupts.o	(.text)
-    common/dlmalloc.o		(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o	(.text)
+    common/env_embedded.o      (.text)
 
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
@@ -74,9 +40,6 @@  SECTIONS
   {
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -86,24 +49,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -113,7 +72,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -127,12 +85,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/freescale/m5271evb/u-boot.lds b/board/freescale/m5271evb/u-boot.lds
index e16a266..4717036 100644
--- a/board/freescale/m5271evb/u-boot.lds
+++ b/board/freescale/m5271evb/u-boot.lds
@@ -22,52 +22,17 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-GROUP(libgcc.o)
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o		(.text)
-    arch/m68k/lib/traps.o		(.text)
-    arch/m68k/cpu/mcf52x2/interrupts.o	(.text)
-    common/dlmalloc.o		(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf52x2/start.o		(.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
     common/env_embedded.o	(.ppcenv)
 
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
@@ -75,9 +40,6 @@  SECTIONS
   {
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -87,24 +49,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -114,7 +72,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -128,12 +85,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/freescale/m5272c3/u-boot.lds b/board/freescale/m5272c3/u-boot.lds
index ff5bfe6..c4039ed 100644
--- a/board/freescale/m5272c3/u-boot.lds
+++ b/board/freescale/m5272c3/u-boot.lds
@@ -22,51 +22,17 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o		(.text)
-    arch/m68k/lib/traps.o		(.text)
-    arch/m68k/cpu/mcf52x2/interrupts.o	(.text)
-    common/dlmalloc.o		(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o	(.text)
+    common/env_embedded.o      (.text)
 
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
@@ -74,9 +40,6 @@  SECTIONS
   {
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -86,24 +49,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -113,7 +72,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -127,12 +85,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/freescale/m5275evb/u-boot.lds b/board/freescale/m5275evb/u-boot.lds
index 8e792fe..6c2dfe8 100644
--- a/board/freescale/m5275evb/u-boot.lds
+++ b/board/freescale/m5275evb/u-boot.lds
@@ -22,50 +22,17 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o		(.text)
-    common/dlmalloc.o		(.text)
-    lib/string.o	(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o(.text)
+    common/env_embedded.o      (.text)
 
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
@@ -73,35 +40,29 @@  SECTIONS
   {
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
   _erotext = .;
   PROVIDE (erotext = .);
-    .reloc   :
+
+  .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -124,12 +85,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/freescale/m5282evb/u-boot.lds b/board/freescale/m5282evb/u-boot.lds
index 7e6aa6a..4ba1964 100644
--- a/board/freescale/m5282evb/u-boot.lds
+++ b/board/freescale/m5282evb/u-boot.lds
@@ -22,51 +22,14 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o	(.text)
-    common/dlmalloc.o	(.text)
-    lib/string.o	(.text)
-    lib/vsprintf.o	(.text)
-    lib/crc32.o	(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
-    . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
@@ -74,35 +37,29 @@  SECTIONS
   {
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
   _erotext = .;
   PROVIDE (erotext = .);
-    .reloc   :
+
+  .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -125,12 +82,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;
diff --git a/board/idmr/u-boot.lds b/board/idmr/u-boot.lds
index e16a266..f697ccd 100644
--- a/board/idmr/u-boot.lds
+++ b/board/idmr/u-boot.lds
@@ -22,52 +22,14 @@ 
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-GROUP(libgcc.o)
+
 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      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/m68k/cpu/mcf52x2/start.o		(.text)
-    arch/m68k/lib/traps.o		(.text)
-    arch/m68k/cpu/mcf52x2/interrupts.o	(.text)
-    common/dlmalloc.o		(.text)
-    lib/zlib.o		(.text)
+    arch/m68k/cpu/mcf52x2/start.o	(.text*)
 
-    . = DEFINED(env_offset) ? env_offset : .;
-    common/env_embedded.o	(.ppcenv)
-
-    *(.text)
-    *(.fixup)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
@@ -75,9 +37,6 @@  SECTIONS
   {
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -87,24 +46,20 @@  SECTIONS
   .reloc   :
   {
     __got_start = .;
-    *(.got)
+    KEEP(*(.got))
     __got_end = .;
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -114,7 +69,6 @@  SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -128,12 +82,11 @@  SECTIONS
   __init_end = .;
 
   __bss_start = .;
-  .bss (NOLOAD)       :
+  .bss (NOLOAD)      :
   {
    _sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
    _ebss = .;