ARM hard-float linker path - consensus

Steve McIntyre steve.mcintyre at
Wed Apr 18 12:35:50 UTC 2012

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/
>And here's a transcription of the minutes from

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, "") || strcmp(soname, ""))
          /* 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;

Steve McIntyre                                steve.mcintyre at
<> | Open source software for ARM SoCs

More information about the cross-distro mailing list