Use linker to export document functions

See 0b1221ce85905a066adfaae62fc73470b34af4d5