This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
R_SPARC_RELATIVE vs R_SPARC_UA32 & unaligned unwind tables - again
- From: DJ Delorie <dj at redhat dot com>
- To: gcc-bugs at gcc dot gnu dot org, binutils at sources dot redhat dot com
- Cc: dj at redhat dot com
- Date: Tue, 18 Dec 2001 21:31:35 -0500
- Subject: R_SPARC_RELATIVE vs R_SPARC_UA32 & unaligned unwind tables - again
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.