This is PR34121,
previously we would fail on following:
% cat sym.c
void f() {}
% cat sym.script
g = f;
VERSION { V1 { global: f; g; local: *; }; }
% clang -fPIC -c sym.c
% ld.lld -shared -o libsym.so sym.o sym.script --no-undefined-version
ld.lld: error: version script assignment of 'V1' to symbol 'g' failed: symbol not defined
That happened because at the point of proccessing symbol versions, symbol g was
not yet created. Patch changes logic to create undefined symbols referenced by script
earlier, so we are able to assing version correctly.
Inline this function.