Still, the error seems to come from the linker ignoring symbol visibility. pmemblk_priv_funcs.o is created using objcopy --localize-hidden with a list of symbols that need to be visible, but somehow linker still sees those hidden symbols when linking everything.