Code suggested by Rui Ueyama in PR34238 comments.
Previously LTO optimized away symbols referenced from linker script
because did not see that them are used from regular objects.
Patch adds such symbols as undefined earlier, before running LTO,
what sets IsUsedInRegularObj for them and fixes the issue.
You don't need to mention that because that is also applicable to all code that adds undefined symbols. If you add this comment, you need to add the same comment to line 1026, for example. Essentially, all undefined symbols must be added line 1025 as the comment for that line explains.