bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: ia64/ld/bfd pltoff problem


From: Belochapka, Konstantin
Subject: RE: ia64/ld/bfd pltoff problem
Date: Tue, 29 Jun 2004 17:45:05 -0700

Sorry, I did not mentioned build version - it is latest binutils release 2.15.
This problem actually existed in all previous releases since ia64 port was 
introduced.

Test case for this problem:

        .text
        .align 16
        .global func#
        .proc func#
func:
        nop  0
        ;;
        br.ret.sptk.many b0
        ;;
        .endp func#

        .global main#
        .align 16
        .proc main#
main:
        addl r9 = @pltoff(func),r0
        ;;
        br.ret.sptk.many b0
        ;;
        .endp main#

Code fragment where I have added the fix

\bfd\elfxx-ia64.c :
        ....
        ....
static bfd_boolean
elfNN_ia64_check_relocs (abfd, info, sec, relocs)
        .....
        ....
/*line 2478 */
      if (need_entry & NEED_FULL_PLT)
        dyn_i->want_plt2 = 1;
      if (need_entry & NEED_PLTOFF) {
        dyn_i->want_pltoff = 1;
        if( !get_pltoff (abfd, info, ia64_info)) return FALSE; /* FIX: prevent 
crash in ia64_size_dynamic_sections*/
      }                 
        ....
        ....




-----Original Message-----
From: Jim Wilson [mailto:address@hidden
Sent: 29 June 2004 17:20
To: Belochapka, Konstantin
Cc: address@hidden
Subject: Re: ia64/ld/bfd pltoff problem


On Fri, 2004-06-18 at 16:22, Belochapka, Konstantin wrote:
> Ia64 ld crashes when it meets instruction that contains @pltoff

You haven't provided enough info for me to easily understand the
problem.

You mentioned that the crash happens inside ia64_size_dynamic_sections,
but you didn't say where or why.  I don't see why adding a call to
get_pltoff can prevent a crash in this function.

It would be useful if you could provide a testcase, so I can debug the
problem myself.  Or alternatively, provide a better description of what
is going wrong, and why the patch is needed.  I tried looking at the
code a bit, but I don't see any obvious reason why the change is needed.

You mentioned a line number where you inserted code, but line numbers
change often, so this isn't always useful.  A context diff is generally
much more useful.

You didn't mention what binutils version you are using.  If this is an
older binutils release, maybe it is already fixed in current sources.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]