Add a testcase for PR ld/18591
[deliverable/binutils-gdb.git] / ld / ldexp.c
index 7694f7b0ec0de6a33feeb576f87f34f0642bb1f3..22dd0d2f1d99beac27690f82c2db423d6db25c81 100644 (file)
@@ -1,5 +1,5 @@
 /* This module handles expression trees.
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2016 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
 
    This file is part of the GNU Binutils.
@@ -1126,11 +1126,14 @@ exp_fold_tree_1 (etree_type *tree)
              if (h == NULL
                  || !(h->type == bfd_link_hash_new
                       || h->type == bfd_link_hash_undefined
+                      || h->type == bfd_link_hash_undefweak
                       || h->linker_def))
                {
                  /* Do nothing.  The symbol was never referenced, or
-                    was defined in some object file.  Undefined weak
-                    symbols stay undefined.  */
+                    was defined in some object file.  Note that
+                    undefweak symbols are defined by PROVIDE.  This
+                    is to support glibc use of __rela_iplt_start and
+                    similar weak references.  */
                  break;
                }
            }
This page took 0.024201 seconds and 4 git commands to generate.