[U-Boot] [PATCH 05/13] ppc: Remove extable relocation fixups

Peter Tyser ptyser at xes-inc.com
Mon Sep 21 18:20:29 CEST 2009


Signed-off-by: Peter Tyser <ptyser at xes-inc.com>
---
 lib_ppc/extable.c |   26 ++++++--------------------
 1 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/lib_ppc/extable.c b/lib_ppc/extable.c
index 91e2b3d..7408d5c 100644
--- a/lib_ppc/extable.c
+++ b/lib_ppc/extable.c
@@ -53,27 +53,13 @@ search_one_table(const struct exception_table_entry *first,
 		 unsigned long value)
 {
 	long diff;
-	if ((ulong) first > CONFIG_SYS_MONITOR_BASE) {
-		/* exception occurs in FLASH, before u-boot relocation.
-		 * No relocation offset is needed.
-		 */
-		while (first <= last) {
-			diff = first->insn - value;
-			if (diff == 0)
-				return first->fixup;
-			first++;
-		}
-	} else {
-		/* exception occurs in RAM, after u-boot relocation.
-		 * A relocation offset should be added.
-		 */
-		while (first <= last) {
-			diff = (first->insn + gd->reloc_off) - value;
-			if (diff == 0)
-				return (first->fixup + gd->reloc_off);
-			first++;
-		}
+	while (first <= last) {
+		diff = first->insn - value;
+		if (diff == 0)
+			return first->fixup;
+		first++;
 	}
+
 	return 0;
 }
 
-- 
1.6.2.1



More information about the U-Boot mailing list