[OpenWrt-Devel] wireguard: unknown relocation: 102 [ARMv7 Thumb-2]

Jason A. Donenfeld Jason at zx2c4.com
Wed Jun 17 16:33:49 EDT 2020


So, some more research: it looks like the R_ARM_THM_JUMP11 symbol is
actually wg_packet_send_staged_packets, a boring C function with
nothing fancy about it. That github issue you pointed to suggested
that it might have something to do with complex crypto functions, but
it looks like that's not the case. wg_packet_send_staged_packets is
plain old boring C.

But there is one interesting thing about
wg_packet_send_staged_packets: it's defined in send.c, and called from
send.c, receive.c, device.c, and netlink.c -- four places. What I
suspect is happening is that the linker can't quite figure out how to
order the functions in the final executable so that the
wg_packet_send_staged_packets definition is sufficiently close to all
of its call sites, so it then needs to add that extra trampoline
midway to get to it. Stupid linker. I'm playing now if there's some
manual reordering I can do in the build system so that this isn't a
problem, but I'm not very optimistic that I'll succeed.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list