We need to pass some absolute symbols through, but the highest bit test
is filtering all of them out. Remove that, and filter more specifically.
---
arm64.c | 4 ++--
defs.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arm64.c b/arm64.c
index 5f8e2f6852434..8cfb863d1bfe2 100644
--- a/arm64.c
+++ b/arm64.c
@@ -305,7 +305,7 @@ arm64_verify_symbol(const char *name, ulong value, char type)
if (!name || !strlen(name))
return FALSE;
- if (((type == 'A') || (type == 'a')) && (highest_bit_long(value)
!= 63))
+ if ((type == 'A') && (HAS_SUFFIX(name, ".c") ||
HAS_SUFFIX(name, ".o")))
return FALSE;
if ((value == 0) &&
@@ -315,7 +315,7 @@ arm64_verify_symbol(const char *name, ulong value, char type)
if (STREQ(name, "$d") || STREQ(name, "$x"))
return FALSE;
- if ((type == 'A') && STRNEQ(name, "__crc_"))
+ if ((type == 'A') && (STRNEQ(name, "__crc_") || STRNEQ(name,
"__reg_num_")))
return FALSE;
if (!(machdep->flags & KSYMS_START) && STREQ(name,
"idmap_pg_dir"))
diff --git a/defs.h b/defs.h
index 7004619017e41..1bcd1b3b177db 100644
--- a/defs.h
+++ b/defs.h
@@ -155,6 +155,9 @@ static inline int string_exists(char *s) { return (s ? TRUE : FALSE);
}
(strcmp((char *)(A), (char *)(B)) == 0))
#define STRNEQ(A, B) (string_exists((char *)A) && string_exists((char *)B)
&& \
(strncmp((char *)(A), (char *)(B), strlen((char *)(B))) == 0))
+#define HAS_SUFFIX(s, suffix) (string_exists((char *)s) && string_exists((char
*)suffix) && \
+ strlen((char *)s) > strlen((char *)suffix) && \
+ (strcmp((char *)(s) + strlen((char *)s) - strlen((char *)suffix), (char *)suffix)
== 0))
#define BZERO(S, N) (memset(S, NULLCHAR, N))
#define BCOPY(S, D, C) (memcpy(D, S, C))
#define BNEG(S, N) (memset(S, 0xff, N))
--
2.4.3