Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: tidy up comments in create_expfile.sh #26220

Merged
merged 1 commit into from
Feb 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 27 additions & 26 deletions tools/create_expfile.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,45 @@
#!/bin/sh
# This script writes out all the exported symbols to a file
# AIX needs this as sybmols are not exported by an
# executable by default and we need to list
# them specifically in order to export them
# so that they can be used by native add-ons
# Writes out all of the exported symbols to a file.
# This is needed on AIX as symbols are not exported
# by an executable by default and need to be listed
# specifically for export so that they can be used
# by native add-ons.
#
# The raw symbol data is objtained by using nm on
# the .a files which make up the node executable
# The raw symbol data is obtained by using nm on
# the .a files which make up the node executable.
#
# -Xany makes sure we get symbols on both
# 32 bit and 64 bit as by default we'd only get those
# for 32 bit
# -Xany processes symbols for both 32-bit and
# 64-bit (the default is for 32-bit only).
#
# -g selects only exported symbols
# -g selects only exported symbols.
#
# -C, -B and -p ensure the output is in a format we
# can easily parse and convert into the symbol we need
# -C, -B and -p ensure that the output is in a
# format that can be easily parsed and converted
# into the required symbol.
#
# -C suppresses the demangling of C++ names
# -B gives us output in BSD format
# -p displays the info in a standard portable output format
# -C suppresses the demangling of C++ names.
# -B writes the output in BSD format.
# -p displays the info in a standard portable
# output format.
#
# We only include symbols if they are of the
# following types and don't start with a dot.
# Only include symbols if they are of the following
# types and don't start with a dot.
#
# T - Global text symbol
# D - Global data symbol
# B - Gobal bss symbol.
# T - Global text symbol.
# D - Global data symbol.
# B - Global bss symbol.
#
# the final sort allows us to remove any duplicates
# The final sort allows removal of any duplicates.
#
# We need to exclude gtest libraries as they are not
# linked into the node executable
# Symbols for the gtest libraries are excluded as
# they are not linked into the node executable.
#
echo "Searching $1 to write out expfile to $2"

# this special sequence must be at the start of the exp file
# This special sequence must be at the start of the exp file.
echo "#!." > $2.tmp

# pull the symbols from the .a files
# Pull the symbols from the .a files.
find $1 -name "*.a" | grep -v gtest \
| xargs nm -Xany -BCpg \
| awk '{
Expand Down