#627 GAS 2.9.4 chokes on comments and assembling a push

component_package
closed
binutils (105)
2004-07-25
2004-07-25
Ermo
No

In the following code snippet, GAS fails to assembly a line
which contains a constant defined with .equ.

Furthermore, comments which starts with a digit are not
allowed (GAS thinks they are directives) so I've used
an additional REM.

Platform is Win32.

_________________________________________________

# GNU assembler version 2.9.4 (i586-cygwin32) using BFD
version 2.9.4
# bug-gnu-utils@gnu.org

.intel_syntax

.set printf, _printf

.data

szFormat: .asciz "9 == %d\n"
Len = . - szFormat \# Should be "Len = 9".

.text

.global _main

_main:
push ebp
mov ebp, esp

    \# Direct constant is ok.
    push 9
    push offset szFormat
    call printf
    add esp, 8

    push Len
    \# Previou line assembled as \(hex\):
    \# FF
    \# REM 35 09 00 00 00 00
    \# The program will crash.
    push offset szFormat
    call printf
    add esp, 8

    xor eax, eax

    mov esp, ebp    
    pop ebp
    ret

.end

Discussion

  • Danny Smith

    Danny Smith - 2004-07-25

    Logged In: YES
    user_id=11494

    gas 2.9.4 is obsolete. (released in 1998). Upgrade to a newer
    version of binutils package.

     
  • Danny Smith

    Danny Smith - 2004-07-25
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks