local-soname-hack
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Thu, 12 Mar 2020 22:47:03 +0000 (22:47 +0000)
committerAurelien Jarno <aurel32@debian.org>
Thu, 12 Mar 2020 22:47:03 +0000 (22:47 +0000)
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

Gbp-Pq: Topic arm
Gbp-Pq: Name local-soname-hack.diff

elf/dl-load.c

index 5abeb867f17a1fe0fcea4e6d66b62267d55695d3..8e065de7eb4abad814566d2a56e6b3c8a1fef99d 100644 (file)
@@ -1946,10 +1946,13 @@ _dl_map_object (struct link_map *loader, const char *name,
          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;
        }