1 From d45c60c2feb38d95e7ad95af6edb39a6d5afba81 Mon Sep 17 00:00:00 2001
2 From: Andreas Schwab <schwab@redhat.com>
3 Date: Wed, 19 Oct 2011 17:13:56 +0200
4 Subject: [PATCH] Preserve link time dependencies over relocation dependencies
8 @@ -100,7 +100,17 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
9 /* Look through the relocation dependencies of the object. */
11 if (__builtin_expect (relmaps[m] == thisp, 0))
14 + /* If a cycle exists with a link time dependency,
15 + preserve the latter. */
16 + struct link_map **runp = thisp->l_initfini;
18 + while (*runp != NULL)
19 + if (__builtin_expect (*runp++ == maps[k], 0))