bug-gnu-utils
[Top][All Lists]
Advanced

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

Regarding for solution ???????


From: V. Srinivas
Subject: Regarding for solution ???????
Date: Tue, 31 Jul 2001 11:27:21 +0530

 
 address@hidden

 hello,
   
    I installed binutils-2.11.tar on my PC. this PC consists of windows NT 4. 
 
    this is my gcc version, ld-new and as-new
 
  $ gcc -v
       
Reading specs from  
        sparc-sun-solaris2.6/2.95.3/specs
        gcc version 2.95.3 20010315 (release)
 
 $ ld-new -v
 
GNU ld version 2.11 (with BFD 2.11)
 
 $ as-new -v
 
GNU assembler version 2.11 (sparc-sun-solaris2.6) using BFD  version 2.11
 
 (I wrote a program as follows in hello.S):
(1)

(hello.S)
 
 
.data                                  
                                                                                 
msg:                                                                             
        .string "Hello, world!\n"      
        len = . - msg                  
                                                                                 
.text                                  
                                                                                 
                       
    .global _start     
                       
                                                                                 
_start:                                                                          
                                                                                 
                                                                                 
        movl    $len,%edx      
        movl    $msg,%ecx      
        movl    $1,%ebx        
        movl    $4,%eax        
        int     $0x80          
                                                                                 
                                                                                 
        movl    $0,%ebx        
        movl    $1,%eax        
        int     $0x80          
-----------------------------------------------------------------------
 
 this is my program....
 
 then, Building an objectfile as follows:
 
 $ as-new -o hello.o hello.S                                                     
 
       I  found errors like as follows:
        
                                        hello.s: Assembler messages:
                                        hello.s:15: Error: Illegal operands
                                        hello.s:16: Error: Illegal operands
                                        hello.s:17: Error: Illegal operands
                                        hello.s:18: Error: Illegal operands
                                        hello.s:19: Error: Unknown opcode: `int'
                                        hello.s:22: Error: Illegal operands
                                        hello.s:23: Error: Illegal operands
                                        hello.s:24: Error: Unknown opcode: `int'
 what is the wrong in that.....
 
 
(2)
     1  .data
     2
     3  msg:
     4          .string "hello, world \n"
     5          len = . - msg
     6
     7  .text
     8
     9
    10          .global _start
    11
    12
    13  _start:
    14         .ascii " hello, world \n"
 
 this is my another program....
 
 then, Building an objectfile as follows:
 
 $ as-new  -o  sample.o  sample.S                                                     
 
     No errors found
   This makes sample.o object file.
-----------------------------------------------------------------------
 
 Producing executable
 
 $ ld-new -s -o sample sample.o                                                    
 
   no errors has been found .....
 
 then, i want to see the output
 
 $ sample
   segmentation fault(core dumped)

  
it showing like this....
 
so, what is the problem in that.
 
(3)
    how i will debugging in gas...........
 
please let me know the problems......???????
 
 

reply via email to

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