A typo in elfNN_ia64_choose_gp?

H. J. Lu hjl@lucon.org
Mon Sep 8 23:52:00 GMT 2003


Hi Richard,

elfNN_ia64_choose_gp tries to pick a good gp. But it also counts
the text sections when it computes min_vma and max_vma. Since there
is a huge gap between the text segment and the data segments on
Linux, the linker always picks the address of GOT as gp. On Linux,
GOT is the lowest address of small data:


  [25] .got              PROGBITS         60000000003ebdb8  004dbdb8
       0000000000002430  0000000000000000 WAp       0     0     8
  [26] .IA_64.pltoff     PROGBITS         60000000003ee1f0  004de1f0
       0000000000000400  0000000000000000 WAp       0     0     16
  [27] .sdata            PROGBITS         60000000003ee5f0  004de5f0
       00000000000016c0  0000000000000000 WAp       0     0     16
  [28] .srdata           PROGBITS         60000000003efcb0  004dfcb0
       0000000000000120  0000000000000000  Ap       0     0     16
  [29] .sdata1           PROGBITS         60000000003efdd0  004dfdd0
       00000000000013d0  0000000000000000 WAp       0     0     16
  [30] .srodata          PROGBITS         60000000003f11a0  004e11a0
       0000000000000000  0000000000000000  Ap       0     0     16
  [31] .sbss             NOBITS           60000000003f11a0  004e11a0
       0000000000000ac0  0000000000000000 WAp       0     0     16
 
As the result, we can't support as much short data as we should. Do
we have to count text sections for min_vma and max_vma? I'd like to
change them to min_data_vma and max_data_vma, and use them to pick
a better gp.

Thanks.


H.J.



More information about the Binutils mailing list