+2017-06-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
+       to merge_gnu_properties.
+       * elf-properties.c (elf_merge_gnu_properties): Add struct
+       bfd_link_info * and pass it to merge_gnu_properties.
+       (elf_merge_gnu_property_list): Add struct bfd_link_info *
+       and pass it to elf_merge_gnu_properties.
+       (_bfd_elf_link_setup_gnu_properties): Pass info to
+       elf_merge_gnu_property_list.
+       * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
+       bfd_link_info *.
+       * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
+
 2017-06-11  Joe Zbiciak  <joe.zbiciak@leftturnonly.info>
 
        PR 21564
 
                                                  unsigned int);
 
   /* Merge GNU properties.  Return TRUE if property is updated.  */
-  bfd_boolean (*merge_gnu_properties) (bfd *, elf_property *,
-                                      elf_property *);
+  bfd_boolean (*merge_gnu_properties) (struct bfd_link_info *, bfd *,
+                                      elf_property *, elf_property *);
 
   /* Set up GNU properties.  */
   bfd *(*setup_gnu_properties) (struct bfd_link_info *);
 
    with ABFD.  */
 
 static bfd_boolean
-elf_merge_gnu_properties (bfd *abfd, elf_property *aprop,
-                         elf_property *bprop)
+elf_merge_gnu_properties (struct bfd_link_info *info, bfd *abfd,
+                         elf_property *aprop, elf_property *bprop)
 {
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
   unsigned int pr_type = aprop != NULL ? aprop->pr_type : bprop->pr_type;
   if (bed->merge_gnu_properties != NULL
       && pr_type >= GNU_PROPERTY_LOPROC
       && pr_type < GNU_PROPERTY_LOUSER)
-    return bed->merge_gnu_properties (abfd, aprop, bprop);
+    return bed->merge_gnu_properties (info, abfd, aprop, bprop);
 
   switch (pr_type)
     {
 /* Merge GNU property list *LISTP with ABFD.  */
 
 static void
-elf_merge_gnu_property_list (bfd *abfd, elf_property_list **listp)
+elf_merge_gnu_property_list (struct bfd_link_info *info, bfd *abfd,
+                            elf_property_list **listp)
 {
   elf_property_list *p, **lastp;
   elf_property *pr;
       pr = elf_find_and_remove_property (listp, p->property.pr_type);
       /* Pass NULL to elf_merge_gnu_properties for the property which
         isn't on *LISTP.  */
-      elf_merge_gnu_properties (abfd, &p->property, pr);
+      elf_merge_gnu_properties (info, abfd, &p->property, pr);
       if (p->property.pr_kind == property_remove)
        {
          /* Remove this property.  */
 
   /* Merge the remaining properties on *LISTP with ABFD.  */
   for (p = *listp; p != NULL; p = p->next)
-    if (elf_merge_gnu_properties (abfd, NULL, &p->property))
+    if (elf_merge_gnu_properties (info, abfd, NULL, &p->property))
       {
        pr = _bfd_elf_get_property (abfd, p->property.pr_type,
                                    p->property.pr_datasz);
           when all properties are from ELF objects with different
           machine code or class.  */
        if (first_pbfd != NULL)
-         elf_merge_gnu_property_list (first_pbfd, listp);
+         elf_merge_gnu_property_list (info, first_pbfd, listp);
 
        if (list != NULL)
          {