[Skiboot] [PATCH] mambo: Match whole string when looking up symbols with linsym/skisym
Michael Ellerman
mpe at ellerman.id.au
Wed May 31 13:04:51 AEST 2017
linsym/skisym use a regex to match the symbol name, and accepts a
partial match against the entry in the symbol map, which can lead to
somewhat confusing results, eg:
systemsim % linsym early_setup
0xc000000000027890
systemsim % linsym early_setup$
0xc000000000aa8054
systemsim % linsym early_setup_secondary
0xc000000000027890
I don't think that's the behaviour we want, so append a $ to the name so
that the symbol has to match against the whole entry, eg:
systemsim % linsym early_setup
0xc000000000aa8054
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
external/mambo/mambo_utils.tcl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl
index 837ae9b06abe..1e3dea0e8af1 100644
--- a/external/mambo/mambo_utils.tcl
+++ b/external/mambo/mambo_utils.tcl
@@ -336,7 +336,7 @@ proc linsym { name } {
# create a regexp that matches the symbol name
set base {([[:xdigit:]]*) (.)}
- set exp [concat $base " $name"]
+ set exp [concat $base " $name\$"]
set ret ""
foreach {line addr type} [regexp -line -inline $exp $linux_symbol_map] {
@@ -352,7 +352,7 @@ proc skisym { name } {
global mconf
set base {([[:xdigit:]]*) (.)}
- set exp [concat $base " $name"]
+ set exp [concat $base " $name\$"]
set ret ""
foreach {line addr type} [regexp -line -inline $exp $skiboot_symbol_map] {
--
2.7.4
More information about the Skiboot
mailing list