bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/12610] gas calculates wrong difference between two labels


From: rth at gcc dot gnu.org
Subject: [Bug gas/12610] gas calculates wrong difference between two labels
Date: Tue, 29 Mar 2011 17:16:39 +0000

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |rth at gcc dot gnu.org
         AssignedTo|unassigned at sources dot   |rth at gcc dot gnu.org
                   |redhat.com                  |

--- Comment #4 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-29 
17:16:25 UTC ---
Confirmed.  The label is getting attached to the end of the alignment,
rather than the beginning.  Examine the following with and without the
fixme label:

.text
    unop
    unop
    unop
    unop
$LEHB25:
    jsr    $26,_Unwind_Resume
$LEHE25:
$fixme:
    .align    4
    fnop

.data
    .long    $LEHE25 - $LEHB25

Somewhat amusingly, we get the correct answer *with* fixme present.

I have some vague rememberance that the old coff assembler had some
sort of auto-alignment feature, which got copied into the elf assembler.
I suspect this is what is causing the problem.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

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