[Bug gas/4986] New: gas emits duplicate .loc directive from gcc 3.4.6

View: New views
5 Messages — Rating Filter:   Alert me  

[Bug gas/4986] New: gas emits duplicate .loc directive from gcc 3.4.6

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This patch:

http://sourceware.org/ml/binutils/2007-08/msg00433.html

caused

FAIL: undefined line

on Linux/x86-64 with gcc 3.4.6. Before the change, ld generated

/net/gnu-6/export/gnu/src/binutils-next/binutils/ld/testsuite/ld-undefined/undefined.c:9:
undefined reference to `this_function_is_not_defined'

After the patch, ld generates

/net/gnu-6/export/gnu/src/binutils-last/binutils/ld/testsuite/ld-undefined/undefined.c:8:
undefined reference to `this_function_is_not_defined'

Gcc 3.4.6 generates

.globl function
        .type   function, @function
function:
.LFB2:
        .file 1 "/net/gnu-6/export/gnu/src/binutils-last/binutils/ld/testsuite/l
d-undefined/undefined.c"
        .loc 1 8 0
        .loc 1 9 0
        xorl    %eax, %eax
        jmp     this_function_is_not_defined
..

Should we adjust _bfd_dwarf2_find_nearest_line/_bfd_dwarf2_find_line for
this?

--
           Summary: gas emits duplicate .loc directive from gcc 3.4.6
           Product: binutils
           Version: 2.19 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: hjl at lucon dot org
                CC: bug-binutils at gnu dot org,drow at sources dot redhat
                    dot com
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=4986

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/4986] gas emits duplicate .loc directive from gcc 3.4.6

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From hjl at lucon dot org  2007-09-01 02:19 -------
A patch is posted at

http://sourceware.org/ml/binutils/2007-09/msg00003.html

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|gas                         |ld


http://sourceware.org/bugzilla/show_bug.cgi?id=4986

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/4986] gas emits duplicate .loc directive from gcc 3.4.6

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From hjl at lucon dot org  2007-09-01 06:51 -------
I checked in my patch. But it doesn't work on ia64 with gcc 3.4 and 4.1.
I got

 Line Number Statements:
  Extended opcode 2: set Address to 0x0
  Special opcode 12: advance Address by 0 to 0x0 and Line by 7 to 8
  Copy
  Special opcode 230: advance Address by 16 to 0x10 and Line by 1 to 9
  Special opcode 6: advance Address by 0 to 0x10 and Line by 1 to 10
  Special opcode 4: advance Address by 0 to 0x10 and Line by -1 to 9
  Special opcode 229: advance Address by 16 to 0x20 and Line by 0 to 9
  Copy
  Special opcode 34: advance Address by 2 to 0x22 and Line by 1 to 10
  Advance PC by 30 to 0x40
  Extended opcode 1: End of Sequence

We wind up with line 10 instead of line 9.

--


http://sourceware.org/bugzilla/show_bug.cgi?id=4986

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/4986] gas emits duplicate .loc directive from gcc 3.4.6

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From hjl at lucon dot org  2007-09-01 13:05 -------
An updated patch is posted at

http://sourceware.org/ml/binutils/2007-09/msg00005.html

--


http://sourceware.org/bugzilla/show_bug.cgi?id=4986

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/4986] gas emits duplicate .loc directive from gcc 3.4.6

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From hjl at lucon dot org  2007-09-05 19:44 -------
Fixed.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=4986

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils