2006-03-08 H.J. Lu <hongjiu.lu@intel.com>

* elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
This commit is contained in:
H.J. Lu 2006-03-08 21:24:22 +00:00
parent f1b4b38ecb
commit 6d2cf7d80b
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2006-03-08 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
2006-03-07 Richard Sandiford <richard@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>

View File

@ -3928,14 +3928,16 @@ elfNN_ia64_choose_gp (abfd, info)
gp_val = got_sec->output_section->vma;
else if (max_short_vma != 0)
gp_val = min_short_vma;
else
else if (max_vma - min_vma < 0x200000)
gp_val = min_vma;
else
gp_val = max_vma - 0x200000 + 8;
/* If it is possible to address the entire image, but we
don't with the choice above, adjust. */
if (max_vma - min_vma < 0x400000
&& max_vma - gp_val <= 0x200000
&& gp_val - min_vma > 0x200000)
&& (max_vma - gp_val >= 0x200000
|| gp_val - min_vma > 0x200000))
gp_val = min_vma + 0x200000;
else if (max_short_vma != 0)
{