This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 2/4] Handle copy relocations
Tom> Digging a bit deeper, the culprit seems to be lookup_global_symbol.
Tom> I think this function should respect a block that's passed in.
I managed to get the new test completely passing.
I changed basic_lookup_symbol_nonlocal to search the block's global
block, and I removed the long comments fro 2002-3 about why this isn't
done. TBH I think all of that was just mistaken.
This change got to just 2 failures. The last two were both the
"hidden0...main0" variants, which print:
get_version_1: &this_version_id=0x7ffff7fca010, this_version_id=104
get_version_2: &this_version_id=0x7ffff7fca010, this_version_id=104
So, I think for these the answer is to change the new get_symbol_address
to search all objfiles in order. I'm slightly unhappy with this but it
seems correct enough.
I'm re-testing the series and will resubmit it once that's done,
assuming there aren't regressions.