2006-03-08 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 8 Mar 2006 21:24:22 +0000 (21:24 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 8 Mar 2006 21:24:22 +0000 (21:24 +0000)
* elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.

bfd/ChangeLog
bfd/elfxx-ia64.c

index e91d267a1442108ed35af6d621f466b04877fb01..855984af63994758695708cc691a966a3ce75955 100644 (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>
index 7a0cc90371ed2cc898a113d58e654d021ca6e5d7..63c131649b62201df93de302807e1720192b5c0b 100644 (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)
        {
This page took 0.027972 seconds and 4 git commands to generate.