public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* A gas bug
@ 1994-11-09 15:10 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 1994-11-09 15:10 UTC (permalink / raw)
  To: Ken Raeburn; +Cc: Ian Lance Taylor, gas2, Eric Youngdale, Jason Merrill

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-11-09 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-11-09 15:10 A gas bug H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).