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]

gas/gld cannot handle section switches


As you can see, gas mishandled it. I think gld may have a simliar
bug.


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

Disassembly of section .text:
00000000 <foo> call   00000002 <foo+2>
00000005 <foo+5> Address 0x6 is out of bounds.
Disassembly of section .fini:
00000000 <bar> ret    
00000001 <bar+1> nop    
00000002 <bar+2> nop    
00000003 <bar+3> nop    
00000004 <bar+4> nop    
00000005 <bar+5> nop    
00000006 <bar+6> nop    
00000007 <bar+7> nop    
00000008 <bar+8> nop    
00000009 <bar+9> nop    
0000000a <bar+a> nop    
0000000b <bar+b> nop    
0000000c <bar+c> nop    
0000000d <bar+d> nop    
0000000e <bar+e> nop    
0000000f <bar+f> Address 0x10 is out of bounds.
---
	.section .fini
	.align 16
	.type	 bar,@function
bar:
	ret
.Lfe1:
	.size	 bar,.Lfe1-bar
	.align 16
	.type	 foo,@function
.text
foo:
	call bar
	ret
.Lfe2:
	.size	 foo,.Lfe2-foo