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

module: zstd: check we don't leak symbols; regenerate symbol map #13209

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ endif
endif

PHONY += codecheck
codecheck: cstyle shellcheck checkbashisms flake8 mancheck testscheck vcscheck
codecheck: cstyle shellcheck checkbashisms flake8 mancheck testscheck vcscheck zstdcheck

PHONY += checkstyle
checkstyle: codecheck commitcheck
Expand All @@ -125,6 +125,7 @@ cstyle:
-o -type f -name '*.[hc]' \
! -name 'zfs_config.*' ! -name '*.mod.c' \
! -name 'opt_global.h' ! -name '*_if*.h' \
! -name 'zstd_compat_wrapper.h' \
! -path './module/zstd/lib/*' \
! -path './include/sys/lua/*' \
! -path './module/lua/l*.[ch]' \
Expand Down Expand Up @@ -164,6 +165,10 @@ vcscheck:
awk '{c++; print} END {if(c>0) exit 1}' ; \
fi

PHONY += zstdcheck
zstdcheck:
@$(MAKE) -C module/zstd checksymbols

PHONY += lint
lint: cppcheck paxcheck

Expand Down
5 changes: 5 additions & 0 deletions module/zstd/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@ $(MODULE)-objs += $(vanilla-objs)
all:
mkdir -p lib/common lib/compress lib/decompress

gensymbols:
for obj in $(vanilla-objs); do echo; echo "/* $$obj: */"; @OBJDUMP@ -t $$obj | awk '$$2 == "g" && !/ zfs_/ {print "#define\t" $$6 " zfs_" $$6}' | sort; done >> include/zstd_compat_wrapper.h

checksymbols:
@OBJDUMP@ -t $(vanilla-objs) | awk '/file format/ {print} $$2 == "g" && !/ zfs_/ {++ret; print} END {exit ret}'
Loading