Jakub> Oh well, Sun changing the rules.
Jakub> It seems like ld.so behaviour changes based on whether DT_RELACOUNT is
Jakub> seen or not.
Jakub> If DT_RELACOUNT is not seen, R_SPARC_RELATIVE relocs are resolved as
Jakub> *(long *) rela->r_offset += l_addr + rela->r_addend;
Jakub> while if DT_RELACOUNT is seen, it is resolved as:
Jakub> *(long *) rela->r_offset = l_addr + rela->r_addend;
Jakub> Traditionally, Sun ld (for elf32_sparc) created all .rela.got RELATIVE
Jakub> relocations with r_addend 0 and the addend in memory pointed by it while
other
Jakub> RELATIVE had the addend in r_addend and *r_offset 0.
Don't know what DT_RELACOUNT is, but I get the idea.
Sounds like one implication is that -zcombreloc doesn't work on
Sparc, period, but that it may not be too hard to fix.
If someone has a patch I can try, I'd be glad to do so.