tools: make the symbol table generated by mkallsyms.py two-byte aligned

When using stm32, the starting address of the function parsed by mkallsyms.py is an odd number, one large than the actual address

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-02-22 21:36:53 +08:00 committed by Xiang Xiao
parent 3ed255b8b8
commit 6b10d8ed19
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ class SymbolTables(object):
if self.symbol_filter(symbol) is not None:
symbol_name = cxxfilt.demangle(symbol.name)
func_name = re.sub(r"\(.*$", "", symbol_name)
self.symbol_list.append((symbol["st_value"], func_name))
self.symbol_list.append((symbol["st_value"] & ~0x01, func_name))
self.symbol_list = sorted(self.symbol_list, key=lambda item: item[0])
def emitline(self, s=""):