linux - Assembly: ..relocation truncated to fit -
using linux x86 assembly , at&t syntax i'd program max times, prints counter of loop. i've tried this:
.data .text .global main diff = 48 max = 5 count: .byte 0 p: .byte 0 main: compare: movb $count,%al cmp $max,%al jnb end movl $4,%eax movl $1,%ebx xor %ecx,%ecx addb $diff,%cl addb $count,%cl movb %cl,p movb $p,%cl movl $1,%edx int $0x80 movb $count,%al inc %al movb %al,count jmp compare end: movl $1,%eax movl $0,%ebx int $0x80
but gcc gives me these errors:
/tmp/ccqobwxl.o: in function `compare': (.text+0x3): relocation truncated fit: r_386_8 against `.text' /tmp/ccqobwxl.o: in function `compare': (.text+0x19): relocation truncated fit: r_386_8 against `.text' /tmp/ccqobwxl.o: in function `compare': (.text+0x21): relocation truncated fit: r_386_8 against `.text' /tmp/ccqobwxl.o: in function `compare': (.text+0x2a): relocation truncated fit: r_386_8 against `.text' collect2: error: ld returned 1 exit status
what problems , how can fix them?
Comments
Post a Comment