This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: ARM hard-float linker path - consensus
- From: Steve McIntyre <steve dot mcintyre at linaro dot org>
- To: cross-distro at lists dot linaro dot org
- Cc: libc-ports at sourceware dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 Apr 2012 13:35:50 +0100
- Subject: Re: ARM hard-float linker path - consensus
- References: <20120413173704.GG2880@linaro.org>
On Fri, Apr 13, 2012 at 06:37:11PM +0100, Steve McIntyre wrote:
>Hi folks,
>
>As promised, here's minutes from the call we had this
>afternoon. Spoiler: the result we've agreed is
>
> /lib/ld-linux-armhf.so.3
>
>And here's a transcription of the minutes from
>
> https://wiki.linaro.org/OfficeofCTO/HardFloat/LinkerPathCallApr2012
And there's a slight wrinkle we've found (of course). The change of
the filename equates to a change of soname for the linker too. Adam
found this a couple of days back when doing rebuilds of the glibc and
toolchain packages in Ubuntu, and between us we've come up with a
(hacky, ugly, *never* to be upstreamed) solution. It seems to work
fine for us, to at least allow for supporting old binaries until
packages are all rebuilt to use the new linker path/soname. Just
talking to Andreas, the openSUSE folks are running with this too.
/me waits for the barrage of rotten fruit...
============================
For backward compatibility with armhf binaries built with the
old linker SONAME, we need to fake out the linker to believe
the new is the old, until such a point as everything is rebuilt
--- eglibc-2.15.orig/elf/dl-load.c 2012-04-14 12:11:37.000000000 +0000
+++ eglibc-2.15/elf/dl-load.c 2012-04-15 00:39:36.558765502 +0000
@@ -2303,10 +2303,13 @@
soname = ((const char *) D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_SONAME]->d_un.d_val);
if (strcmp (name, soname) != 0)
+#ifdef __arm__
+ if (strcmp(name, "ld-linux.so.3") || strcmp(soname, "ld-linux-armhf.so.3"))
+#endif
continue;
/* We have a match on a new name -- cache it. */
- add_name_to_object (l, soname);
+ add_name_to_object (l, name);
l->l_soname_added = 1;
}
Cheers,
--
Steve McIntyre steve.mcintyre@linaro.org
<http://www.linaro.org/> Linaro.org | Open source software for ARM SoCs