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

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

Strange behaviour of gas version > 2.9.*


From: Konrad Rieck
Subject: Strange behaviour of gas version > 2.9.*
Date: Tue, 10 Jul 2001 18:55:09 +0200
User-agent: Mutt/1.2.5i

Hi,
I am absolutely unsure what strange things I experience, but it seems that
versions of Gas >= 2.9.* interpret i386 instructions differently. This 
causes an illegal instruction after executing the code. 

I have to admit that I am not working the proper way. The generated 
machine code is directly inserted into a binary and not linked using
ELF files. 

I received working code if using
GNU assembler version 2.9.1 (i386-linux), using BFD version 2.9.1.0.25

$ as -a test.s -o test.o | grep copy
  93                    .globl copy
  94                            .type    copy,@function
  95                    copy:
 141                            .size    copy,.Lfe2-copy
 448 0476 E825FCFF              call copy
 464 04a5 E8F6FBFF              call copy
 482 04d6 E8C5FBFF              call copy
 test.s:95                      .text:000000a0 copy

Unfortunaly if am using a higher version, e.g.
GNU assembler version 2.11.90.0.7 (i386-linux) using BFD version 2.11.90.0.7

$ as -a test.s -o test.o | grep copy
  93                    .globl copy
  94                            .type    copy,@function
  95                    copy:
 141                            .size    copy,.Lfe2-copy
 448 0476 E8FCFFFF              call copy
 464 04a5 E8FCFFFF              call copy
 482 04d6 E8FCFFFF              call copy
 test.s:95                      .text:000000a0 copy

"call" instructions are compiled to different assembler opcodes. Why does
the same input file causes different output using different versions of Gas?
In case this is a feature, please advice me how to omit it.

Regards,
Konrad

-- 
Konrad Rieck <address@hidden>                    
Roqefellaz - http://www.r0q.cx, GPG Public Key http://www.r0q.cx/keys/kr.pub
--           Fingerprint: 3AA8 CF92 C179 9760 C3B3  1B43 33B6 9221 AFBF 5897



reply via email to

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