Skip to contentSkip to conversation

: Fix start.S:Error: Conversion of PC relative displacement to absolute

PATCH New Philippe De Muyter 3 participants 8 messages Sep 21, 2009 – Sep 22, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix start.S:Error: Conversion of PC relative displacement to absolute

Hi all,

This fixes the following errors when running MAKEALL for coldfire :
start.S: Assembler messages:
start.S:320: Error: Conversion of PC relative displacement to absolute

cpu/mcf523x/start.S +1 -1
diff -ru a/cpu/mcf523x/start.S b/cpu/mcf523x/start.S
@@ -246,7 +246,7 @@
 /* exception code */
 	.globl _fault
 _fault:
-	jmp _fault
+	bra _fault
 	.globl	_exc_handler
 
 _exc_handler:
cpu/mcf52x2/start.S +1 -1
diff -ru a/cpu/mcf52x2/start.S b/cpu/mcf52x2/start.S
@@ -317,7 +317,7 @@
 /* exception code */
 	.globl _fault
 _fault:
-	jmp _fault
+	bra _fault
 
 	.globl	_exc_handler
 _exc_handler:
cpu/mcf532x/start.S +1 -1
diff -ru a/cpu/mcf532x/start.S b/cpu/mcf532x/start.S
@@ -256,7 +256,7 @@
 /* exception code */
 	.globl _fault
 _fault:
-	jmp _fault
+	bra _fault
 	.globl	_exc_handler
 
 _exc_handler:
#1 lore raw

PATCH 1/1 fix tools/kwbimage.c format warning

Hi all,

This fixes the following warnings when running MAKEALL for coldfire :
tools/kwbimage.c: In function #kwbimage_checksum32#:
tools/kwbimage.c:135: warning: format #%ld# expects type #long int#, but argument 4 has type #unsigned int#

tools/kwbimage.c +1 -1
diff -ru a/tools/kwbimage.c b/tools/kwbimage.c
@@ -131,7 +131,7 @@
 		return 0;
 
 	if (len % sizeof(uint32_t)) {
-		printf ("Error:%s[%d] - lenght is not in multiple of %ld\n",
+		printf ("Error:%s[%d] - length is not in multiple of %u\n",
 			__FUNCTION__, len, sizeof(uint32_t));
 		return 0;
 	}
#2 lore raw

PATCH 1/1 fix tools/kwbimage.c format warning

Dear Philippe De Muyter,

Quoted 12 lines · In message <[email protected]> you wrote:

Hi all,

This fixes the following warnings when running MAKEALL for coldfire :
tools/kwbimage.c: In function #kwbimage_checksum32#:
tools/kwbimage.c:135: warning: format #%ld# expects type #long int#, but argument 4 has type #unsigned int#

diff -ru a/tools/kwbimage.c b/tools/kwbimage.c

tools/kwbimage.c line 135

Quoted 6 lines
tools/kwbimage.c +1 -1
@@ -131,7 +131,7 @@
 		return 0;
 
 	if (len % sizeof(uint32_t)) {
-		printf ("Error:%s[%d] - lenght is not in multiple of %ld\n",
+		printf ("Error:%s[%d] - length is not in multiple of %u\n",
 			__FUNCTION__, len, sizeof(uint32_t));

Seems you are using old code. This has long been fixed (using a %zu format).

Best regards,

Wolfgang Denk

Signature · 5 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
Men don't talk peace unless they're ready to back it up with war.
	-- Col. Green, "The Savage Curtain", stardate 5906.4
#3 lore raw

PATCH 1/1 fix tools/kwbimage.c format warning

Quoted 17 lines · Wolfgang Denk

Dear Philippe De Muyter,

Quoted 14 lines · In message <[email protected]> you wrote:

Hi all,

This fixes the following warnings when running MAKEALL for coldfire :
tools/kwbimage.c: In function #kwbimage_checksum32#:
tools/kwbimage.c:135: warning: format #%ld# expects type #long int#, but argument 4 has type #unsigned int#

diff -ru a/tools/kwbimage.c b/tools/kwbimage.c

tools/kwbimage.c +0 -0
@@ -131,7 +131,7 @@
 		return 0;
 
Quoted 7 lines

tools/kwbimage.c line 135

Quoted 4 lines
tools/kwbimage.c +1 -1
 	if (len % sizeof(uint32_t)) {
-		printf ("Error:%s[%d] - lenght is not in multiple of %ld\n",
+		printf ("Error:%s[%d] - length is not in multiple of %u\n",
 			__FUNCTION__, len, sizeof(uint32_t));

Seems you are using old code. This has long been fixed (using a %zu format).

That's surprising. I got a tarball last friday (3 days ago) using the snapshot button on the gitweb interface :

	u-boot-3dc5e00454a58499d4f4c790b38036b0e873747e.tar.gz

Best regards

Philippe

#4 lore raw

PATCH 1/1 fix tools/kwbimage.c format warning

Dear Philippe De Muyter,

Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 8 lines

tools/kwbimage.c line 135

Quoted 5 lines
tools/kwbimage.c +1 -1
 	if (len % sizeof(uint32_t)) {
-		printf ("Error:%s[%d] - lenght is not in multiple of %ld\n",
+		printf ("Error:%s[%d] - length is not in multiple of %u\n",
 			__FUNCTION__, len, sizeof(uint32_t));

Seems you are using old code. This has long been fixed (using a %zu format).

Quoted 4 lines

That's surprising. I got a tarball last friday (3 days ago) using the snapshot button on the gitweb interface :

	u-boot-3dc5e00454a58499d4f4c790b38036b0e873747e.tar.gz

You need this commit:

commit ceb2d57c2205db5bbd868577f756c74a2568160c

Author: Wolfgang Denk <[email protected]>
Date:   Tue Sep 15 21:13:27 2009 +0200

kwbimage.c: Fix compile warning when building on 64 bit systems (again)

Commit 51003b89 attempted to fix a build problem on 64 bit systems, but just turned it into a build problem on 32 bit systems (silly me).

Now do the Right Thing (TM) and use a "%zu" printf format.

Also fix spelling error.

It was merged into the master branch on 2009-09-18 23:20:12.

Best regards,

Wolfgang Denk

Signature · 5 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
What is mind?  No matter.  What is matter?  Never mind.
                                      -- Thomas Hewitt Key, 1799-1875
#5 lore raw

PATCH 1/1 fix tools/kwbimage.c format warning

Dear Wolfgang,

Quoted 6 lines · Wolfgang Denk
Quoted 6 lines
Quoted 2 lines

Seems you are using old code. This has long been fixed (using a %zu format).

That's surprising. I got a tarball last friday (3 days ago) using the snapshot button on the gitweb interface :

Quoted 7 lines
Quoted 1 line
	u-boot-3dc5e00454a58499d4f4c790b38036b0e873747e.tar.gz

You need this commit:
...
Date: Tue Sep 15 21:13:27 2009 +0200
...
It was merged into the master branch on 2009-09-18 23:20:12.

OK, that's the explanation : I downloaded the snapshot on 2009-09-18 18:59

thanks and good night

Philippe

#6 lore raw

PATCH 1/1 fix cmd_bdinfo.c:354: warning: 'print_eth' defined but not used

In reply to Philippe De Muyter

Hi all,

This fixes the following warnings when running MAKEALL for coldfire :
cmd_bdinfo.c:354: warning: 'print_eth' defined but not used

common/cmd_bdinfo.c +2 -2
diff -ru a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
@@ -31,7 +31,7 @@
 
 static void print_num(const char *, ulong);
 
-#if !defined(CONFIG_ARM) || defined(CONFIG_CMD_NET)
+#if !(defined(CONFIG_ARM) || defined(CONFIG_M68K)) || defined(CONFIG_CMD_NET)
 static void print_eth(int idx);
 #endif
 
@@ -349,7 +349,7 @@
 	printf ("%-12s= 0x%08lX\n", name, value);
 }
 
-#if !defined(CONFIG_ARM) || defined(CONFIG_CMD_NET)
+#if !(defined(CONFIG_ARM) || defined(CONFIG_M68K)) || defined(CONFIG_CMD_NET)
 static void print_eth(int idx)
 {
 	char name[10], *val;
#7 lore raw

PATCH 1/1 : Fix start.S:Error: Conversionof PC relative displacement to absolute

In reply to Philippe De Muyter

Philippe,

The error that you encountered only happen when using linux cross compiler; however, if choosing uclinux cross compiler this will not be an issue.

Anyway, is an acked for me so that both compiler can be used without causing the problem.

Best Regards,
TsiChung

-----Original Message-----
From: [email protected] [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Philippe De Muyter
Sent: Monday, September 21, 2009 2:49 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH MAKEALL coldfire] : Fix start.S:Error:
Conversionof PC relative displacement to absolute

Hi all,

This fixes the following errors when running MAKEALL for coldfire :
start.S: Assembler messages:
start.S:320: Error: Conversion of PC relative displacement to
absolute

cpu/mcf523x/start.S +1 -1
diff -ru a/cpu/mcf523x/start.S b/cpu/mcf523x/start.S
@@ -246,7 +246,7 @@
 /* exception code */
 	.globl _fault
 _fault:
-	jmp _fault
+	bra _fault
 	.globl	_exc_handler
 
 _exc_handler:
cpu/mcf52x2/start.S +1 -1
diff -ru a/cpu/mcf52x2/start.S b/cpu/mcf52x2/start.S
@@ -317,7 +317,7 @@
 /* exception code */
 	.globl _fault
 _fault:
-	jmp _fault
+	bra _fault
 
 	.globl	_exc_handler
 _exc_handler:
cpu/mcf532x/start.S +1 -1
diff -ru a/cpu/mcf532x/start.S b/cpu/mcf532x/start.S
@@ -256,7 +256,7 @@
 /* exception code */
 	.globl _fault
 _fault:
-	jmp _fault
+	bra _fault
 	.globl	_exc_handler
 
 _exc_handler:

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot