This includes an extra hack to handle a file having both foo and foo@@ver.
Another option is checking with the user if they can juts change their code. For what it is worth it, gold produces the same result as the original patch.
With this patch we produce the same result as bfd.
We also reach here if foo and foo@ver come from different input file, no?