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: Linker bug report for ARC processor


On Fri, Oct 05, 2001 at 05:08:25PM +0800, Lucas Lin wrote:
> 
> 	When several object files are linked into a relocatable object using
> 	"arc-elf-ld -r" command, the relocation entries of  ".rodata"
> section are
> 	wrong.

Since arc-elf uses REL relocs, you need partial_inplace set for all
relocs.  Otherwise, any addend adjustment needed for relocs against
section symbols is lost.  Let me know if this patch works, without
breaking other things.

	* elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
	relocs.

-- 
Alan Modra

Index: bfd/elf32-arc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arc.c,v
retrieving revision 1.9
diff -u -p -r1.9 elf32-arc.c
--- elf32-arc.c	2001/10/02 14:28:42	1.9
+++ elf32-arc.c	2001/10/05 12:29:24
@@ -53,7 +53,7 @@ static reloc_howto_type elf_arc_howto_ta
 	 complain_overflow_bitfield, /* complain_on_overflow  */
 	 bfd_elf_generic_reloc,	/* special_function  */
 	 "R_ARC_NONE",		/* name  */
-	 false,			/* partial_inplace  */
+	 true,			/* partial_inplace  */
 	 0,			/* src_mask  */
 	 0,			/* dst_mask  */
 	 false),		/* pcrel_offset  */
@@ -68,7 +68,7 @@ static reloc_howto_type elf_arc_howto_ta
 	 complain_overflow_bitfield, /* complain_on_overflow  */
 	 bfd_elf_generic_reloc,	/* special_function  */
 	 "R_ARC_32",		/* name  */
-	 false,			/* partial_inplace  */
+	 true,			/* partial_inplace  */
 	 0xffffffff,		/* src_mask  */
 	 0xffffffff,		/* dst_mask  */
 	 false),		/* pcrel_offset  */
@@ -83,7 +83,7 @@ static reloc_howto_type elf_arc_howto_ta
 	 complain_overflow_bitfield, /* complain_on_overflow  */
 	 bfd_elf_generic_reloc,	/* special_function  */
 	 "R_ARC_B26",		/* name  */
-	 false,			/* partial_inplace  */
+	 true,			/* partial_inplace  */
 	 0x00ffffff,		/* src_mask  */
 	 0x00ffffff,		/* dst_mask  */
 	 false),		/* pcrel_offset  */


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