Skip to content

Drop function wrapping as it is redundant for now

Michał Kępień requested to merge 1725-drop-function-wrapping into main

As currently used in the BIND source tree, the --wrap linker option is redundant because:

  • static builds are no longer supported,

  • there is no need to wrap around existing functions - what is actually required (at least for now) is to replace them altogether in unit tests,

  • only functions exposed by shared libraries linked into unit test binaries are currently being replaced.

Given the above, providing the alternative implementations of functions to be overridden in lib/ns/tests/nstest.c is a much simpler alternative to using the --wrap linker option. Drop the code detecting support for the latter from configure.ac, simplify the relevant Makefile.am, and remove lib/ns/tests/wrap.c, updating lib/ns/tests/nstest.c accordingly (it is harmless for unit tests which are not calling the overridden functions).

Closes #1725 (closed)

Merge request reports