Skip to contentSkip to conversation

powerpc: Backout relocation changes.

PATCH New Grant Likely 4 participants 5 messages Nov 14, 2007 – Nov 17, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Backout relocation changes.

From: Grant Likely <[email protected]>

Ugh. I *hate* to back this change out, but these compiler flags don't work for relocation on all versions of GCC. I've not been able to reproduce the environment in my setup (and hence, not been able to find a combination that *does* work), so I've got no choice but to go back to the old gcc flags and linker script.

---
Wolfgang,

I haven't had the opportunity to actually test this, and even if I did I've only got 1 compiler version installed and 2 architectures to test it on.

It is possible that it will cause breakage, but it is a straight revert of the original patches so it should be safe. (I recommend testing before the 1.3.0 release is cut)

Cheers,
g.

 board/cogent/u-boot.lds             |    1 +
 board/hymod/u-boot.lds              |    1 +
 board/mousse/u-boot.lds             |    1 +
 board/rsdproto/u-boot.lds           |    1 +
 cpu/mpc512x/config.mk               |    2 +-
 cpu/mpc5xx/config.mk                |    2 +-
 cpu/mpc5xx/u-boot.lds               |    1 +
 cpu/mpc5xxx/config.mk               |    2 +-
 cpu/mpc5xxx/u-boot-customlayout.lds |    1 +
 cpu/mpc5xxx/u-boot.lds              |    1 +
 cpu/mpc8220/config.mk               |    2 +-
 cpu/mpc8220/u-boot.lds              |    1 +
 cpu/mpc824x/config.mk               |    2 +-
 cpu/mpc824x/u-boot.lds              |    1 +
 cpu/mpc8260/config.mk               |    2 +-
 cpu/mpc8260/u-boot.lds              |    1 +
 cpu/mpc83xx/config.mk               |    2 +-
 cpu/mpc83xx/u-boot.lds              |    1 +
 include/common.h                    |    8 --------
 19 files changed, 18 insertions(+), 15 deletions(-)
board/cogent/u-boot.lds +1 -0
index d87a39b..5ce2694 100644
@@ -55,6 +55,7 @@ SECTIONS
   {
     *(.text)
     common/environment.o(.text)
+    *(.fixup)
     *(.got1)
   }
   _etext = .;
board/hymod/u-boot.lds +1 -0
index 9bf0f09..337a395 100644
@@ -69,6 +69,7 @@ SECTIONS
     common/environment.o(.text)
 
     *(.text)
+    *(.fixup)
     *(.got1)
   }
   _etext = .;
board/mousse/u-boot.lds +1 -0
index eb4d8e4..57358b8 100644
@@ -60,6 +60,7 @@ SECTIONS
     lib_generic/crc32.o		(.text)
     lib_generic/zlib.o		(.text)
 
+    *(.fixup)
     *(.got1)
     . = ALIGN(16);
     *(.rodata)
board/rsdproto/u-boot.lds +1 -0
index 9bd6248..70fc3a5 100644
@@ -55,6 +55,7 @@ SECTIONS
   {
     cpu/mpc8260/start.o	(.text)
     *(.text)
+    *(.fixup)
     *(.got1)
     /*. = env_offset; */
   }
cpu/mpc512x/config.mk +1 -1
index 3259d53..8a07c5a 100644
@@ -19,7 +19,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
-PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -mrelocatable
+PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC512X -DCONFIG_E300 \
 			-ffixed-r2 -ffixed-r29 -msoft-float -mcpu=603e
cpu/mpc5xx/config.mk +1 -1
index e95b8a1..64cd600 100644
@@ -28,7 +28,7 @@
 #
 
 
-PLATFORM_RELFLAGS += 	-fPIC -ffixed-r14 -meabi -mrelocatable
+PLATFORM_RELFLAGS += 	-fPIC -ffixed-r14 -meabi
 
 PLATFORM_CPPFLAGS +=	-DCONFIG_5xx -ffixed-r2 -ffixed-r29 -mpowerpc -msoft-float
 
cpu/mpc5xx/u-boot.lds +1 -0
index 10001b1..5b03fef 100644
@@ -59,6 +59,7 @@ SECTIONS
     cpu/mpc5xx/start.o	(.text)
 
     *(.text)
+    *(.fixup)
     *(.got1)
   }
   _etext = .;
cpu/mpc5xxx/config.mk +1 -1
index 0e861c4..0df51ba 100644
@@ -21,7 +21,7 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -mrelocatable
+PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC5xxx -ffixed-r2 -ffixed-r29 \
 		     -mstring -mcpu=603e -mmultiple
cpu/mpc5xxx/u-boot-customlayout.lds +1 -0
index 1107943..123a14c 100644
@@ -66,6 +66,7 @@ SECTIONS
     common/environment.o        (.ppcenv)
 
     *(.text)
+    *(.fixup)
     *(.got1)
     . = ALIGN(16);
     *(.rodata)
cpu/mpc5xxx/u-boot.lds +1 -0
index a28a3af..78818a4 100644
@@ -55,6 +55,7 @@ SECTIONS
   {
     cpu/mpc5xxx/start.o	(.text)
     *(.text)
+    *(.fixup)
     *(.got1)
     . = ALIGN(16);
     *(.rodata)
cpu/mpc8220/config.mk +1 -1
index c41cafe..8e3ba54 100644
@@ -21,7 +21,7 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -mrelocatable
+PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC8220 -ffixed-r2 -ffixed-r29 \
 		     -mstring -mcpu=603e -mmultiple
cpu/mpc8220/u-boot.lds +1 -0
index a199a64..889bc77 100644
@@ -55,6 +55,7 @@ SECTIONS
   {
     cpu/mpc8220/start.o	(.text)
     *(.text)
+    *(.fixup)
     *(.got1)
     . = ALIGN(16);
     *(.rodata)
cpu/mpc824x/config.mk +1 -1
index 17fdb21..66207f4 100644
@@ -21,7 +21,7 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing -mrelocatable
+PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -msoft-float
 
cpu/mpc824x/u-boot.lds +1 -0
index 8cbef4a..c90d1e9 100644
@@ -55,6 +55,7 @@ SECTIONS
   {
     cpu/mpc824x/start.o		(.text)
     *(.text)
+    *(.fixup)
     *(.got1)
     . = ALIGN(16);
     *(.rodata)
cpu/mpc8260/config.mk +1 -1
index d401e4c..683b6fb 100644
@@ -21,7 +21,7 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -mrelocatable
+PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_8260 -DCONFIG_CPM2 -ffixed-r2 -ffixed-r29 \
 		     -mstring -mcpu=603e -mmultiple
cpu/mpc8260/u-boot.lds +1 -0
index b8abc17..3e84f23 100644
@@ -55,6 +55,7 @@ SECTIONS
   {
     cpu/mpc8260/start.o		(.text)
     *(.text)
+    *(.fixup)
     *(.got1)
     . = ALIGN(16);
     *(.rodata)
cpu/mpc83xx/config.mk +1 -1
index 2ec395d..ecf8a60 100644
@@ -20,7 +20,7 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -mrelocatable
+PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC83XX -DCONFIG_E300 \
 			-ffixed-r2 -ffixed-r29 -msoft-float
cpu/mpc83xx/u-boot.lds +1 -0
index ca663bc..937c87a 100644
@@ -52,6 +52,7 @@ SECTIONS
   {
     cpu/mpc83xx/start.o	(.text)
     *(.text)
+    *(.fixup)
     *(.got1)
     . = ALIGN(16);
     *(.rodata)
include/common.h +0 -8
index aca281b..63ac8b0 100644
@@ -63,19 +63,13 @@ typedef volatile unsigned char	vu_char;
 #endif
 #elif defined(CONFIG_5xx)
 #include <asm/5xx_immap.h>
-#define CONFIG_RELOC_FIXUP_WORKS
 #elif defined(CONFIG_MPC5xxx)
 #include <mpc5xxx.h>
-#define CONFIG_RELOC_FIXUP_WORKS
 #elif defined(CONFIG_MPC512X)
 #include <mpc512x.h>
 #include <asm/immap_512x.h>
-#define CONFIG_RELOC_FIXUP_WORKS
 #elif defined(CONFIG_MPC8220)
 #include <asm/immap_8220.h>
-#define CONFIG_RELOC_FIXUP_WORKS
-#elif defined(CONFIG_824X)
-#define CONFIG_RELOC_FIXUP_WORKS
 #elif defined(CONFIG_8260)
 #if   defined(CONFIG_MPC8247) \
    || defined(CONFIG_MPC8248) \
@@ -87,7 +81,6 @@ typedef volatile unsigned char	vu_char;
 #define CONFIG_MPC8260	1
 #endif
 #include <asm/immap_8260.h>
-#define CONFIG_RELOC_FIXUP_WORKS
 #endif
 #ifdef CONFIG_MPC86xx
 #include <mpc86xx.h>
@@ -100,7 +93,6 @@ typedef volatile unsigned char	vu_char;
 #ifdef CONFIG_MPC83XX
 #include <mpc83xx.h>
 #include <asm/immap_83xx.h>
-#define CONFIG_RELOC_FIXUP_WORKS
 #endif
 #ifdef	CONFIG_4xx
 #include <ppc4xx.h>
#1 lore raw

PATCH 1/1 powerpc: Backout relocation changes.

Quoted 8 lines · Grant Likely

From: Grant Likely <[email protected]>

Ugh. I *hate* to back this change out, but these compiler flags don't work for relocation on all versions of GCC. I've not been able to reproduce the environment in my setup (and hence, not been able to find a combination that *does* work), so I've got no choice but to go back to the old gcc flags and linker script.

Hi Grant,

This linker script needs a similar change too: board/ads5121/u-boot.lds

kind regards,
Rafal

#2 lore raw

PATCH 1/1 powerpc: Backout relocation changes.

Quoted 10 lines · Rafal Jaworowski
Quoted 8 lines · Grant Likely

From: Grant Likely <[email protected]>

Ugh. I *hate* to back this change out, but these compiler flags don't work for relocation on all versions of GCC. I've not been able to reproduce the environment in my setup (and hence, not been able to find a combination that *does* work), so I've got no choice but to go back to the old gcc flags and linker script.

Quoted 3 lines

Hi Grant,

This linker script needs a similar change too: board/ads5121/u-boot.lds

Hmmm, looks that linker script should also be moved to cpu/mpc5121 like has been done for all other powerpc boards.

Good catch, thanks!
g.

Signature · 4 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195
#3 lore raw

PATCH 1/1 powerpc: Backout relocation changes.

In reply to Grant Likely
Quoted 6 lines

-----Original Message-----
From: Grant Likely
Sent: Tuesday, November 13, 2007 11:19 PM
To: u-boot-users at lists.sourceforge.net; wd at denx.de
Subject: [U-Boot-Users] [PATCH] powerpc: Backout relocation changes.

Quoted 7 lines

Ugh. I *hate* to back this change out, but these compiler flags don't work for relocation on all versions of GCC. I've not been able to reproduce the environment in my setup (and hence, not been able to find a combination that *does* work), so I've got no choice but to go back to the old gcc flags and linker script.

It works with both compiler versions here, thanks.

#4 lore raw

PATCH 1/1 powerpc: Backout relocation changes.

In reply to Grant Likely
Quoted 12 lines · In message <[email protected]> you…

From: Grant Likely <[email protected]>

Ugh. I *hate* to back this change out, but these compiler flags don't work for relocation on all versions of GCC. I've not been able to reproduce the environment in my setup (and hence, not been able to find a combination that *does* work), so I've got no choice but to go back to the old gcc flags and linker script.

---
Wolfgang,

Quoted 7 lines

I haven't had the opportunity to actually test this, and even if I did I've only got 1 compiler version installed and 2 architectures to test it on.

It is possible that it will cause breakage, but it is a straight revert of the original patches so it should be safe. (I recommend testing before the 1.3.0 release is cut)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Though a program be but three lines long,
someday it will have to be maintained."
- The Tao of Programming