[rtems commit] bsps/powerpc: Fix linker command files

Sebastian Huber sebh at rtems.org
Tue Apr 1 12:03:56 UTC 2014


Module:    rtems
Branch:    master
Commit:    8e980e61680bfcba2f18a6d2f636e53ed9abf370
Changeset: http://git.rtems.org/rtems/commit/?id=8e980e61680bfcba2f18a6d2f636e53ed9abf370

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Apr  1 09:48:40 2014 +0200

bsps/powerpc: Fix linker command files

---

 c/src/lib/libbsp/powerpc/beatnik/startup/linkcmds |    6 ++----
 c/src/lib/libbsp/powerpc/shared/startup/linkcmds  |    6 ++----
 c/src/lib/libbsp/powerpc/virtex4/startup/linkcmds |    6 ++----
 c/src/lib/libbsp/powerpc/virtex5/startup/linkcmds |    6 ++----
 4 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/beatnik/startup/linkcmds b/c/src/lib/libbsp/powerpc/beatnik/startup/linkcmds
index 667e193..7afd734 100644
--- a/c/src/lib/libbsp/powerpc/beatnik/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/beatnik/startup/linkcmds
@@ -109,8 +109,7 @@ SECTIONS
   _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
   _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
   _TLS_Alignment = ALIGNOF (.tdata);
-_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
-  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  }	> CODE
+  .sdata2         : { PROVIDE (_SDA2_BASE_ = 32768); *(.sdata2) *(.gnu.linkonce.s2.*)  }	> CODE
   .sbss2          : { 
     				PROVIDE (__sbss2_start = .);
 					  *(.sbss2*) *(.gnu.linkonce.sb2.*)
@@ -193,8 +192,7 @@ _SDA2_BASE_ = __SDATA2_START__ + 0x8000;
   /* 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.  */
-_SDA_BASE_ = __SDATA_START__ + 0x8000;
-  .sdata          : { *(.sdata*) *(.gnu.linkonce.s.*) }	> CODE
+  .sdata          : { PROVIDE (_SDA_BASE_ = 32768); *(.sdata*) *(.gnu.linkonce.s.*) }	> CODE
   _edata  =  .;
   PROVIDE (edata = .);
 /* END OF THE LOADED IMAGE (parts moved by the preloader) */
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds
index df5affb..5ebc5e9 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds
@@ -115,8 +115,7 @@ SECTIONS
   .fini_array     : { *(.fini_array) } >CODE
   PROVIDE (__fini_array_end = .);
 
-_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
-  .sdata2         : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } >CODE
+  .sdata2         : {PROVIDE (_SDA2_BASE_ = 32768); *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } >CODE
   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) 
                         /* avoid empty sdata2/sbss2 area -- __eabi would not set up r2
                          * which may be important if run-time loading is used
@@ -215,8 +214,7 @@ _SDA2_BASE_ = __SDATA2_START__ + 0x8000;
   /* 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.  */
-_SDA_BASE_ = __SDATA_START__ + 0x8000;
-  .sdata	  : { *(.sdata*) *(.gnu.linkonce.s.*)	} >CODE
+  .sdata	  : { PROVIDE (_SDA_BASE_ = 32768); *(.sdata*) *(.gnu.linkonce.s.*)	} >CODE
   _edata  =  .;
   PROVIDE (edata = .);
   .sbss      :
diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/linkcmds b/c/src/lib/libbsp/powerpc/virtex4/startup/linkcmds
index ed8ef75..00311c9 100644
--- a/c/src/lib/libbsp/powerpc/virtex4/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/virtex4/startup/linkcmds
@@ -112,8 +112,7 @@ SECTIONS
   _TLS_Alignment = ALIGNOF (.tdata);
 
   /* Initialised small data addressed as offsets from r2 */
-_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
-  .sdata2         : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)          } > RAM
+  .sdata2         : { PROVIDE (_SDA2_BASE_ = 32768); *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)          } > RAM
 
   /* Zeroed small data addressed as offsets from r2 */
   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
@@ -206,8 +205,7 @@ _SDA2_BASE_ = __SDATA2_START__ + 0x8000;
    * we can shorten the on-disk segment size.
    */
   /* Initialised small data addressed as offsets from r13 */
-_SDA_BASE_ = __SDATA_START__ + 0x8000;
-  .sdata          : { *(.sdata* .gnu.linkonce.s.*)                     } > RAM
+  .sdata          : { PROVIDE (_SDA_BASE_ = 32768); *(.sdata* .gnu.linkonce.s.*)                     } > RAM
 
   _edata          = .;
   PROVIDE (edata  = .);
diff --git a/c/src/lib/libbsp/powerpc/virtex5/startup/linkcmds b/c/src/lib/libbsp/powerpc/virtex5/startup/linkcmds
index 3929b21..247bee2 100644
--- a/c/src/lib/libbsp/powerpc/virtex5/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/virtex5/startup/linkcmds
@@ -112,8 +112,7 @@ SECTIONS
   _TLS_Alignment = ALIGNOF (.tdata);
 
   /* Initialised small data addressed as offsets from r2 */
-_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
-  .sdata2         : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)          } > RAM
+  .sdata2         : { PROVIDE (_SDA2_BASE_ = 32768); *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)          } > RAM
 
   /* Zeroed small data addressed as offsets from r2 */
   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
@@ -206,8 +205,7 @@ _SDA2_BASE_ = __SDATA2_START__ + 0x8000;
    * we can shorten the on-disk segment size.
    */
   /* Initialised small data addressed as offsets from r13 */
-_SDA_BASE_ = __SDATA_START__ + 0x8000;
-  .sdata          : { *(.sdata* .gnu.linkonce.s.*)                     } > RAM
+  .sdata          : { PROVIDE (_SDA_BASE_ = 32768); *(.sdata* .gnu.linkonce.s.*)                     } > RAM
 
   _edata          = .;
   PROVIDE (edata  = .);




More information about the vc mailing list