Skip to content

Commit

Permalink
Make symbols script work cross-platform
Browse files Browse the repository at this point in the history
The symbols script had darwin-x64 hardcoded as the platform and arch,
which means that running the script doesn't work on Linux.

This commit adds directory read and selects a file that starts with
'libsodium', which is a `.dylib` file on MacOS and `.so` on Linux. This
commit also makes a slight changes to the nm execution, which was
previously depending on flags that aren't used across other versions of
nm.

This commit uses only `--dynamic`, and uses the symbol type column to
select the symbols that we want without depending on command-line flags
that aren't always available. I've output the results into the readme,
and the only surprising change is that numbers and underscores are now
being sorted differently in the 'missing altogether' section. This is
because the previous code sorted the unparsed lines from nm, which meant
that we were sorting by memory address rather than symbol name.
  • Loading branch information
christianbundy committed Sep 14, 2020
1 parent 86ef239 commit 38db473
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
Loading

0 comments on commit 38db473

Please sign in to comment.