This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

Re: Broken .loc directive in GAS


On Fri, Jul 11, 2003 at 08:27:50AM +0200, Michal Ludvig wrote:
> Richard Henderson told me that:
> >On Thu, Jul 10, 2003 at 05:36:08PM +0200, Michal Ludvig wrote:
> >>Offset 0x52 points 2 bytes beyond the end of the section ...
> >
> >Well, that would be a bug, certainly.  Test case?
> 
> Test case was in my first posting - attached file temp.cc (attaching it 

I don't see any problem with current gcc-3.3 and mainline, and an older
gcc-3.3.  Current mainline gives:

 The File Name Table:
  Entry Dir     Time    Size    Name
  1     1       0       0       temp.cc

 Line Number Statements:
  Extended opcode 2: set Address to 0x80483ba
  Special opcode 13: advance Address by 0 to 0x80483ba and Line by 8 to 9
  Advance PC by 6 to 80483c0
  Extended opcode 1: End of Sequence

  Extended opcode 2: set Address to 0x80483b4
  Special opcode 13: advance Address by 0 to 0x80483b4 and Line by 8 to 9
  Advance PC by 6 to 80483ba
  Extended opcode 1: End of Sequence

  Extended opcode 2: set Address to 0x8048354
  Advance Line by 16 to 17
  Copy
  Special opcode 230: advance Address by 16 to 0x8048364 and Line by 1 to 18
  Special opcode 76: advance Address by 5 to 0x8048369 and Line by 1 to 19
  Special opcode 48: advance Address by 3 to 0x804836c and Line by 1 to 20
  Advance Line by -7 to 13
  Special opcode 89: advance Address by 6 to 0x8048372 and Line by 0 to 13
  Advance PC by 35 to 8048395
  Special opcode 12: advance Address by 0 to 0x8048395 and Line by 7 to 20
  Special opcode 48: advance Address by 3 to 0x8048398 and Line by 1 to 21
  Advance PC by 28 to 80483b4
  Extended opcode 1: End of Sequence

For reference, I've attached the -S output I get from your testcase.
I suppose it's possible that ld is being confused by your crt*, libgcc
or libc.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

Attachment: temp.s
Description: Text document


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