When we have a R_PPC64_ADDR64 for a weak undef symbol, which thus resolves to 0, and we're creating a shared library, we need to make sure that it stays 0 (because code that conditionally calls the weak function tests for this). Unfortunately, we were creating a R_PPC64_RELATIVE for these relocation targets, making the address of the undefined weak symbol equal to the base address of the shared library (which is non-zero). It seems like, in general, we should not be creating RelativeReloc relocs for undef weak symbols.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The test I think is correct. Give me a minute to see if there is a
better place in the code to put the check.
Comment Actions
The test is OK, but would the attached patch fix the problem for you?
I think it is a better spot to put the test.