https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88643
--- Comment #5 from Sebastian Huber <sebastian.hu...@embedded-brains.de> --- I think the basic problem is that the LD --wrap feature works only with undefined symbols references and not relocations: See also: https://www.sourceware.org/ml/binutils/2019-01/msg00204.html