This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

A gas bug


Hi,

I have verified that it indeed is a gas bug which prevents the ELF
support in gcc working properly. As you can see, foo.s is
mis-assembled as

00000000 <foo> call   00000002 <foo+2>

with

 0000 e8fdffff ffc3                        ......          

I patched .o file by hand to

00000000 <foo> call   00000001 <foo+1>

with

 0000 e8fcffff ffc3                        ......          

It seems ok. I am not very familiar with gas and don't know hard to
fix this bug.


-- 
H.J. Lu
NYNEX Science and Technology, Inc.			hjl@nynexst.com
---
foo.o:     file format elf32-i386

Disassembly of section .text:
00000000 <bar> Address 0x1 is out of bounds.
Disassembly of section .fini:
00000000 <foo> call   00000002 <foo+2>
00000005 <foo+5> Address 0x6 is out of bounds.

foo.o:     file format elf32-i386

Contents of section .text:
 0000 c3                                   .               
Contents of section .data:
Contents of section .fini:
 0000 e8fdffff ffc3                        ......          
----
.text
	.type	 bar,@function
bar:
	ret
	.section .fini
	.type	 foo,@function
foo:
	call bar
	ret