This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to fix internal linker error


Hi IAn,

:      I would like to apply the following patch.  It fixes an internal
:      linker error when the arm-pe port is building.
: 
:      Any objections ?
: 
: I'd like to find out more about that error.  I don't see any way that
: BLOCK could appear in a node_code field.  What am I missing?

Well, I am not sure how it occurs.  The problem arises when trying to
build an arm-pe toolchain.  The test built of libgcc1-test fails with
this message:

  ./collect-ld: internal error /home/nickc/work/sources/devo/ld/ldexp.c 573

When I added a call to einfo ("%F%S\n") at line 573 I got:

  built in linker script:110

And if I look at line 110 of the builtin script (pe.sc) I see:

    .stab BLOCK(__section_alignment__) (NOLOAD) :
    {
      [ .stab ]
    }
    .stabstr BLOCK(__section_alignment__) (NOLOAD) :
    {
      [ .stabstr ]
    }
  
  }                <===line 110

So I was not at all sure what was going wrong.  However, when I
checked the ld.texinfo file it said:

  @item BLOCK(@var{exp})
  @kindex BLOCK(@var{exp})
  This is a synonym for @code{ALIGN}, for compatibility with older linker
  scripts.  It is most often seen when setting the address of an output
  section.

So I reasoned that accepting BLOCK as an ALIGN_K operation would be a
reasonable fix.

Cheers
	Nick

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]