[Patch] sh64: Fix another plt problem

Clarke, Stephen stephen.clarke@superh.com
Wed Oct 9 16:57:00 GMT 2002


The attached file contains a patch for the fixup code
in an SHmedia pic plt entry - it turns out we'd never
exercised the lazy jump slot fixup because of the
problem with gotplt relocations I posted a fix for a
couple of weeks ago.

I hope the fix is obvious: to derive the address of
.got from r12 you need to subtract the GOT_BIAS
from r12 (or as the code does it, add -GOT_BIAS to r12).

Tested on SH-5 Linux.  Without this fix, whenever
libc.so is dynamically loaded you get a seg fault
the first time a lazy fix-up is attempted (which is
in the glibc init code).

Steve.
--
Stephen Clarke, Principal Engineer, SuperH Inc.
Phone:1-408-273-3146, Fax:1-408-273-3199, mailto:Stephen.Clarke@superh.com
Mail:  SuperH Inc., 405 River Oaks Pkwy, San Jose, CA 95134, USA.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sh64-plt-patch.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20021009/094d9f2d/attachment.txt>


More information about the Binutils mailing list