This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: Reloc BUG in as


> Hi.
> 
> as sometimes does not create reloc entry. It is a bug. Tested on binutils
> 2.10.91.
> 
> Mikulas
> 
> 
> $ as
> a:
> b:
> call a-b
> $ objdump --reloc
> 
> a.out:     file format elf32-i386
> 
> RELOCATION RECORDS FOR [.text]:
> OFFSET   TYPE              VALUE
> 00000001 R_386_PC32        *ABS*
> 
> 
> $ as
> call a-b
> a:
> b:
> $ objdump --reloc
> 
> a.out:     file format elf32-i386
> 
> $

This patch fixes it. It is the exact place where pcrel is lost.

Mikulas

--- gas/write.c_	Fri Mar  2 15:33:45 2001
+++ gas/write.c	Fri Mar  2 15:34:53 2001
@@ -2558,7 +2558,6 @@
 		S_GET_VALUE (sub_symbolP);
 
 	      add_symbolP = NULL;
-	      pcrel = 0;	/* No further pcrel processing.  */
 
 	      /* Let the target machine make the final determination
 		 as to whether or not a relocation will be needed to


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