blob: e9ed891a4c56a7df289b1b0cba028bf24764759c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Allow readelf to print types without parentheses
--- toolkit/library/dependentlibs.py
+++ toolkit/library/dependentlibs.py
@@ -57,11 +57,15 @@ def dependentlibs_readelf(lib):
for line in proc.stdout:
# Each line has the following format:
# tag (TYPE) value
+ # or with BSD readelf:
+ # tag TYPE value
# Looking for NEEDED type entries
tmp = line.split(' ', 3)
- if len(tmp) > 3 and tmp[2] == '(NEEDED)':
+ if len(tmp) > 3 and 'NEEDED' in tmp[2]:
# NEEDED lines look like:
# 0x00000001 (NEEDED) Shared library: [libname]
+ # or with BSD readelf:
+ # 0x00000001 NEEDED Shared library: [libname]
match = re.search('\[(.*)\]', tmp[3])
if match:
deps.append(match.group(1))
|