-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ci: check the prefixing policy for runtime symbols #9260
Changes from all commits
895d8a0
2dba8a7
13dc03e
21292fa
48661a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,23 @@ set -o pipefail | |
|
||
[ -z "$*" ] && { echo "Usage: $0 libfoo.a" 1>&2; exit 2; } | ||
|
||
nm -A -P "$@" | awk ' | ||
nm -A -P "$@" | LC_ALL=C awk ' | ||
# ignore caml_foo, camlFoo_bar, _caml_foo, _camlFoo_bar | ||
$2 ~ /^(_?caml[_A-Z])/ { next } | ||
# ignore local and undefined symbols | ||
$3 ~ /^[rbdtsU]$/ { next } | ||
$3 ~ /^[a-zU]$/ { next } | ||
# ignore "main", which should be externally linked | ||
$2 ~ /^_?main$/ { next } | ||
$2 ~ /^_?wmain$/ { next } | ||
# Caml_state escapes the prefixing rule for now | ||
$2 ~ /^_?Caml_state$/ { next } | ||
# for x86 PIC mode | ||
$2 ~ /^__x86.get_pc_thunk./ { next } | ||
# for mingw32 | ||
$2 ~ /^.debug_/ { next } | ||
# windows unicode support | ||
$2 ~ /^_win_multi_byte_to_wide_char$/ { next } | ||
$2 ~ /^_win_wide_char_to_multi_byte$/ { next } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't find any reason why these two exported functions are not prefixed with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's a hangover from the original patch, which used |
||
# print the rest | ||
{ found=1; print $1 " " $2 " " $3 } | ||
# fail if there were any results | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Character ranges and case are weird because of posix and locales. (See gawk docs for a lament). Changing
[rbdtsU]
to[a-zU]
sounds good, but to make it reliable we need to changeawk
toLC_ALL=C awk
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed - see also #8986!