Patch Set 1:
> It works as both the function caller and the function itself are in the same
> .c/.o file.
In this case the function caller is somewhere deep in libbsc, and it is calling
a function originally defined somewhere deep in libosmo-abis. We are putting
another definition that function in the local file, in the hope that the libbsc
caller is diverted to the local function instead of libosmo-abis. Feels lucky
to me, in the sense that the symbol is only pulled from the libosmo-abis
library if it doesn't exist in the current ... erm ... "scope". Does it still
work if libosmo-abis and libbsc both appear before the main.o on the linking
cmdline? I'm not familiar with that.
Even if that magic works and it's only me not knowing about it, I still think
it adds clarity if we *explicitly* wrap it?
BTW, so, if I by accident pick an already existing function name in my main.c,
I silently override the other definition in the linking? Scary :) -- though I
think I saw the compiler complaining about multiple definitions of the same
function on occasions.
To view, visit https://gerrit.osmocom.org/7121
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>