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]
Other format: [Raw text]

xcoff reloc fix


Tom Rix added this as part of a larger commit.  See
http://sources.redhat.com/ml/binutils/2002-05/msg00042.html
I'm removing it because it breaks the gas testsuite and produces
obviously wrong results for objdump -r.

eg. for testsuite/gas/macros/test2.s, we get:

$ binaix213/binutils/objdump  -r dump.o

dump.o:     file format aixcoff-rs6000

RELOCATION RECORDS FOR [.text]:
OFFSET           TYPE              VALUE 
0000000000000000 R_POS             foo1
0000000000000004 R_POS             foo2+0x0000000000000004
0000000000000008 R_POS             foo3+0x0000000000000008


instead of:

$ binaix/binutils/objdump  -r dump.o

dump.o:     file format aixcoff-rs6000

RELOCATION RECORDS FOR [.text]:
OFFSET           TYPE              VALUE 
0000000000000000 R_POS             foo1
0000000000000004 R_POS             foo2
0000000000000008 R_POS             foo3

If you're reading this list Tom, any idea why this code was added?

	* coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
	addend.
	* coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.

Index: bfd/coff-rs6000.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-rs6000.c,v
retrieving revision 1.49
diff -u -p -r1.49 coff-rs6000.c
--- bfd/coff-rs6000.c	6 Aug 2002 05:52:29 -0000	1.49
+++ bfd/coff-rs6000.c	6 Aug 2002 08:13:07 -0000
@@ -996,11 +996,6 @@ xcoff_rtype2howto (relent, internal)
       && (relent->howto->bitsize
 	  != ((unsigned int) internal->r_size & 0x1f) + 1))
     abort ();
-
-  /* Put a meaningful value in addend */
-  relent->addend = (internal->r_size & 0x80
-		    ? -internal->r_vaddr
-		    : internal->r_vaddr);
 }
 
 reloc_howto_type *
Index: bfd/coff64-rs6000.c
===================================================================
RCS file: /cvs/src/src/bfd/coff64-rs6000.c,v
retrieving revision 1.37
diff -u -p -r1.37 coff64-rs6000.c
--- bfd/coff64-rs6000.c	6 Aug 2002 05:52:29 -0000	1.37
+++ bfd/coff64-rs6000.c	6 Aug 2002 08:13:09 -0000
@@ -1788,11 +1788,6 @@ xcoff64_rtype2howto (relent, internal)
       && (relent->howto->bitsize
 	  != ((unsigned int) internal->r_size & 0x3f) + 1))
     abort ();
-
-  /* Put a meaningful value in addend */
-  relent->addend = (internal->r_size & 0x80
-		    ? -internal->r_vaddr
-		    : internal->r_vaddr);
 }
 
 reloc_howto_type *

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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