R_SPARC_RELATIVE vs R_SPARC_UA32 & unaligned unwind tables - again
DJ Delorie
dj@redhat.com
Tue Dec 18 18:57:00 GMT 2001
Ok, I seem to have bumped into a "this just isn't possible" scenario.
We create unaligned 32-bit pointers in unwind tables (specifically,
in the augmentation fields for context->lsda in gcc/unwind-dw2.c).
If these pointers are in a shared library, the dynamic linker needs to
adjust them according to where the shared library is loaded.
However, the only reloc available for that is R_SPARC_RELATIVE, and it
requires aligned data. If you try to use it with unaligned data,
ld.so aborts. If you don't use it, unwinding causes aborts because
the pointer points to the wrong place.
Could we make that pointer fde-relative or something, so that ld.so
doesn't need to adjust it? Or make it aligned? I can't think of any
other fix, unless there's some other R_SPARC_* reloc that does what's
needed here.
More information about the Gcc-bugs
mailing list