This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Invalid LTOFF22X -> GPREL22 relaxation
On Tue, Nov 17, 2009 at 12:04 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Nov 17, 2009 at 11:06 AM, Richard Henderson <rth@redhat.com> wrote:
>> On 11/17/2009 10:37 AM, H.J. Lu wrote:
>>>
>>> ? ? ? ?PR ld/10955
>>> ? ? ? ?* elfxx-ia64.c (elfNN_ia64_link_hash_table): Add max_short_sec,
>>> ? ? ? ?max_short_offset, min_short_sec and min_short_offset.
>>> ? ? ? ?(elfNN_ia64_update_short_info): New.
>>> ? ? ? ?(elfNN_ia64_relax_section): Update max_short_sec,
>>> ? ? ? ?max_short_offset, min_short_sec and min_short_offset.
>>> ? ? ? ?(elfNN_ia64_choose_gp): Use min_short_sec/max_short_sec if
>>> ? ? ? ?they are set.
>>
>> Looks good, thanks.
>>
>
> I made a mistake. I should record output section, not input section
> since different input files may have the different input sections with
> the same section name, which has the same output section. The new
> binutils failed with gcc 4.4 on RHEL5/ia64.
>
> I am testing this patch on gcc 4.4. I will check it in if it works.
>
Another problem. VMA of ABS section is 0. We need to skip it
also. Otherwise libjava fails to build.
--
H.J.
2009-11-17 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10955
* elfxx-ia64.c (elfNN_ia64_update_short_info): Also skip ABS
sections.
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index ed105c8..420a0ef 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -764,8 +764,9 @@ static void
elfNN_ia64_update_short_info (asection *sec, bfd_vma offset,
struct elfNN_ia64_link_hash_table *ia64_info)
{
- /* Skip SHF_IA_64_SHORT sections. */
- if (sec->flags & SEC_SMALL_DATA)
+ /* Skip ABS and SHF_IA_64_SHORT sections. */
+ if (sec == bfd_abs_section_ptr
+ || (sec->flags & SEC_SMALL_DATA) != 0)
return;
if (!ia64_info->min_short_sec)