This is the mail archive of the
mailing list for the binutils project.
Re: [GOLD] common symbol resolution
"Carter, Jack" <firstname.lastname@example.org> writes:
> Don't look at this as using something against you. I am just trying to
> do the right thing and used a google search to try and find some rules.
> I thought I found the rules spelled out by you.
> What are the formal Gold relocation rules? It can't be the code because
> there is no way to detect what is gospel and what is a bug. I need to know
> because I am tasked with passing the ld tests with the gold linker so we
> can replace ld with gold.
Sorry, the rules are the code and the testsuite. You're quite right: in
corner cases not covered by the testsuite there is no way to know
whether gold is behaving correctly or not. In fact in those corner
cases there is often no general agreement as to what correct behaviour
Of course gold always follow the ELF ABI to the best of my
understanding. But the ABI unfortunately does not spell out all cases.
Even two of the earliest ELF linkers, the SVR4 linker and the Solaris
linker, disagreed on some symbol resolution corner cases. The situation
has not improved since then.