Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils/dist/bfd Fix broken logic that create...



details:   https://anonhg.NetBSD.org/src/rev/ed56da9e2931
branches:  trunk
changeset: 770202:ed56da9e2931
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 07 22:30:56 2011 +0000

description:
Fix broken logic that created R_SPARC_64 relocations when -Bsymbolic.
When -Bsymbolic, all resolved symbols need to be created with relative
relocations. The dynamic linker depends on that because it only
knows how to perform relative relocations in the first pass to
relocate itself.  This bug ended up creating R_SPARC_64 symbols for
12 relocation symbols in ld.elf_so, one of them dlopen(), which
ended up breaking things using dlopen(), most notably PAM.

diffstat:

 external/gpl3/binutils/dist/bfd/elfxx-sparc.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (19 lines):

diff -r 96f6364d2ca1 -r ed56da9e2931 external/gpl3/binutils/dist/bfd/elfxx-sparc.c
--- a/external/gpl3/binutils/dist/bfd/elfxx-sparc.c     Fri Oct 07 21:33:56 2011 +0000
+++ b/external/gpl3/binutils/dist/bfd/elfxx-sparc.c     Fri Oct 07 22:30:56 2011 +0000
@@ -3393,11 +3393,10 @@
              /* h->dynindx may be -1 if the symbol was marked to
                 become local.  */
              else if (h != NULL &&
-                      h->dynindx != -1
-                      && (! is_plt
-                          || !info->shared
-                          || !SYMBOLIC_BIND (info, h)
-                          || !h->def_regular))
+                      h->dynindx != -1 && ! is_plt &&
+                      (!info->shared
+                       || !SYMBOLIC_BIND (info, h)
+                       || !h->def_regular))
                {
                  BFD_ASSERT (h->dynindx != -1);
                  outrel.r_info = SPARC_ELF_R_INFO (htab, rel, h->dynindx, r_type);



Home | Main Index | Thread Index | Old Index