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]

About macro expand



Hello, all
  
I have a assembly program (as following).That use the "MAX" constant.
But,i does not define it in the program.
When i assemble this program, it can be assembled successfully.
That mean that it does not have any error message.
But, this program is wrong because the "MAX"  value is unkonw.
 
My question is how to modify the GNU assembler source code or maybe i just add 
some option before i assemble the program. Then, if the assember encounter 
this unknow value,it can stop assemble and show the
value unknow error message.
                                                                               
 thanks a lot
 
  .file   "hello.c"
    .section    .rodata
    .align  2
.LC0:
    .ascii  "This is a test value(%d)\n\000"
    .text
    .align  2
    .global main
    .type   main, %function
main:
    @ args = 0, pretend = 0, frame = 0
    @ frame_needed = 1, uses_anonymous_args = 0
    mov ip, sp
    stmfd   sp!, {fp, ip, lr, pc}
    sub fp, ip, #4
    ldr r0, .L2
    mov r1, #MAX
    bl  printf
    mov r3, #0
    mov r0, r3
    ldmfd   sp, {fp, sp, pc}
.L3:
    .align  2
.L2:
    .word   .LC0
    .size   main, .-main
    .ident  "GCC: (GNU) 3.4 20031119 (experimental)"
~


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