Skip to content

Commit

Permalink
module: zstd: check we don't leak symbols; regenerate symbol map
Browse files Browse the repository at this point in the history
Closes: openzfs#12988
Co-authored-by: Rich Ercolani <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
  • Loading branch information
nabijaczleweli and rincebrain committed Mar 13, 2022
1 parent 76bcffb commit ee92729
Show file tree
Hide file tree
Showing 3 changed files with 338 additions and 380 deletions.
6 changes: 5 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 Down Expand Up @@ -164,6 +164,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:
@OBJDUMP@ -t $(vanilla-objs) | awk '/file format/ {print ""; print "/* " $$1 " */"; next} $$2 == "g" && !/ zfs_/ {print "#define\t" $$6 " zfs_" $$6}' >> include/zstd_compat_wrapper.h

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

0 comments on commit ee92729

Please sign in to comment.