Skip to content

Commit 5ac0b55

Browse files
authored
pythongh-141376: Remove exceptions from make smelly (pythonGH-141392)
* Don't ignore initialized data and BSS * Remove exceptions for _init and _fini
1 parent 3bacae5 commit 5ac0b55

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Tools/build/smelly.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
})
2222

2323
IGNORED_EXTENSION = "_ctypes_test"
24-
# Ignore constructor and destructor functions
25-
IGNORED_SYMBOLS = {'_init', '_fini'}
2624

2725

2826
def is_local_symbol_type(symtype):
@@ -34,19 +32,12 @@ def is_local_symbol_type(symtype):
3432
if symtype.islower() and symtype not in "uvw":
3533
return True
3634

37-
# Ignore the initialized data section (d and D) and the BSS data
38-
# section. For example, ignore "__bss_start (type: B)"
39-
# and "_edata (type: D)".
40-
if symtype in "bBdD":
41-
return True
42-
4335
return False
4436

4537

4638
def get_exported_symbols(library, dynamic=False):
4739
print(f"Check that {library} only exports symbols starting with Py or _Py")
4840

49-
# Only look at dynamic symbols
5041
args = ['nm', '--no-sort']
5142
if dynamic:
5243
args.append('--dynamic')
@@ -89,8 +80,6 @@ def get_smelly_symbols(stdout, dynamic=False):
8980

9081
if is_local_symbol_type(symtype):
9182
local_symbols.append(result)
92-
elif symbol in IGNORED_SYMBOLS:
93-
local_symbols.append(result)
9483
else:
9584
smelly_symbols.append(result)
9685

0 commit comments

Comments
 (0)