This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi all,The attached patch fixes a problem you get if you build dynamic binaries for a 32-bit powerpc target on a 64-bit powerpc host.
At the time I did this port I didn't fully understand all the scenarios you might run into.
The issue is this, on all FreeBSD archs the interpreter is ld-elf.so.1.On powerpc64 we have also an ld-elf32.so.1 for 32-bit binaries. In case we run a 32-bit binary on a 64-bit host the RTLD reroutes the call to this ld-elf32.so.1.
Up to now this rerouting didn't happen since gcc used the ld-elf32.so.1 instead. The binary runs fine on the 64-bit host since the RTLD finds a ld-elf32.so.1.
But now when I take this binary to a 32-bit host I can't run it since the RTLD does not find the ld-elf32.so.1.
The patch fixes this and simplifies the LINK_OS_FREEBSD_SPEC_DEF for FreeBSD powerpc64.
If there are no major objections I'm going to apply this patch to trunk, gcc-5 and gcc-49 branch in the next days. It is FreeBSD powerpc64 only and it is a bug.
Thanks, Andreas 2015-12-22 Andreas Tobler <andreast@gcc.gnu.org> * config/rs6000/freebsd64.h: Delete FREEBSD_DYNAMIC_LINKER32/64 defines. Use FBSD_DYNAMIC_LINKER instead. Rename and simplify LINK_OS_FREEBSD_SPEC_DEF32/64 to LINK_OS_FREEBSD_SPEC_DEF.
Attachment:
fbsd-ppc64-link-spec.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |