* elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
authorRichard Henderson <rth@redhat.com>
Tue, 13 Feb 2001 23:08:09 +0000 (23:08 +0000)
committerRichard Henderson <rth@redhat.com>
Tue, 13 Feb 2001 23:08:09 +0000 (23:08 +0000)
        and not user provided.

bfd/ChangeLog
bfd/elfxx-ia64.c

index ded63f6ae13fa0dc435f285aff736d09afd31d70..c99a66c68795a869360ac1808a2d492d6710902b 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-13  Richard Henderson  <rth@redhat.com>
+
+       * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
+       and not user provided.
+
 2001-02-13  Kazu Hirata  <kazu@hxi.com>
 
        * vms.c (vms_print_symbol): Remove unreachable code.
index fc9c2262e2830a163e5ed042f69dedbaa52032b5..09982ef102c8bce882856d6b6213fe5e0e401578 100644 (file)
@@ -3157,6 +3157,13 @@ elfNN_ia64_final_link (abfd, info)
        }
 
       _bfd_set_gp_value (abfd, gp_val);
+
+      if (gp)
+       {
+         gp->root.type = bfd_link_hash_defined;
+         gp->root.u.def.value = gp_val;
+         gp->root.u.def.section = bfd_abs_section_ptr;
+       }
     }
 
   /* If we're producing a final executable, we need to sort the contents