[PATCH] Fix ppc32 ld.so

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Fri May 16 13:14:00 GMT 2003


At 17:16 15.05.2003, Jakub Jelinek wrote:
>Hi!
>
>This is something I cannot understand how it ever worked.
>If there is a reloc overflow on ppc32, _dl_reloc_overflow tries to print the
>name of the symbol. But unless sym is NULL (and thus errsym = refsym) resp.
>equal to refsym, it will print something from the refsym's strtab at index
>sym->st_name, ie. a random string at best, worst case segfault.
>To print sym's name instead of refsym's (though I don't understand why that
>is needed, both sym and refsym ought to always have the same symbol name,
>otherwise symbol lookup is broken) we'd have to pass down sym_map as well,
>but sym_map is not always computed (ATM only if --with-tls).

Hmm, IIRC that was a mere result of try and error. I think I used the first 
version that produced sensible results with the (small) binutils testcases. 
Certainly you have more insight in that relocation code and I believe you 
if you say that it just worked by luck :-).

Franz.



More information about the Libc-hacker mailing list