Exclude FStar and Hacl: Python port of 9b33e7d7d7

Signed-off-by: Yuto Takano <yuto.takano@arm.com>
This commit is contained in:
Yuto Takano 2021-08-05 20:22:59 +01:00
parent 062289c657
commit e77f699ed5

View File

@ -348,6 +348,7 @@ class NameCheck(object):
"""
UNDEFINED_SYMBOL = r"^\S+: +U |^$|^\S+:$"
VALID_SYMBOL = r"^\S+( [0-9A-Fa-f]+)* . _*(?P<symbol>\w+)"
EXCLUSIONS = ("FStar", "Hacl")
symbols = []
@ -363,8 +364,8 @@ class NameCheck(object):
for line in nm_output.splitlines():
if not re.match(UNDEFINED_SYMBOL, line):
symbol = re.match(VALID_SYMBOL, line)
if symbol:
symbols.append(symbol.group('symbol'))
if symbol and not symbol.group("symbol").startswith(EXCLUSIONS):
symbols.append(symbol.group("symbol"))
else:
self.log.error(line)