kou commented on code in PR #40520:
URL: https://github.com/apache/arrow/pull/40520#discussion_r1556705262
##########
dev/archery/archery/linking.py:
##########
@@ -61,9 +63,84 @@ def list_dependency_names(self):
names.append(name)
return names
+ def _extract_symbols(self, symbol_info):
+ return [re.search(r'\S+$', line).group() for line in symbol_info if
line]
+
+ def _remove_weak_symbols(self, symbol_info):
+ return [line for line in symbol_info if not re.search(r'\s[Ww]\s',
line)]
+
+ def _capture_symbols(self, remove_symbol_versions, symbol_info):
+ if remove_symbol_versions:
+ symbol_info = [re.split('@@', line)[0] for line in symbol_info]
+ return symbol_info
+
+ def list_symbols_for_dependency(self, dependency,
remove_symbol_versions=False):
+ if dependency == 'linux-vdso.so.1':
+ return []
+ result = _nm.run('-D', dependency, stdout=subprocess.PIPE)
Review Comment:
Did you run it on Ubuntu (or Debian)?
Debug information is separated on Ubuntu (or Debian).
(CentOS 7 that is used by java-jars doesn't do it.)
You need to run `nm` against separated debug information file:
```bash
$ sudo apt install -y libc6-dbg
$ LANG=C readelf -n /lib/x86_64-linux-gnu/libc.so.6 | grep "Build ID:"
Build ID: 3b0430552f7704425a91887df0fcd734bf3c0f6f
$ nm -P
/usr/lib/debug/.build-id/3b/0430552f7704425a91887df0fcd734bf3c0f6f.debug
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]