From b4adccfd55af25705da3ace48c229d89be3f877a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Feb 2001 23:08:09 +0000 Subject: [PATCH] * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required and not user provided. --- bfd/ChangeLog | 5 +++++ bfd/elfxx-ia64.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ded63f6ae13..c99a66c6879 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-02-13 Richard Henderson + + * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required + and not user provided. + 2001-02-13 Kazu Hirata * vms.c (vms_print_symbol): Remove unreachable code. diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index fc9c2262e28..09982ef102c 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -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 -- 2.30.2