This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Linker bug report for ARC processor
- To: Lucas Lin <LucasLin at via dot com dot tw>
- Subject: Re: Linker bug report for ARC processor
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Fri, 5 Oct 2001 22:08:53 +0930
- Cc: bug-gnu-utils at gnu dot org, Nick Clifton <nickc at cambridge dot redhat dot com>, Rongwen Chang <RongwenChang at via dot com dot tw>, Aaron Lin <AaronLin at via dot com dot tw>, Mark Lu <MarkLu at via dot com dot tw>, binutils at sourceware dot cygnus dot com
- References: <A16FE16CC3D5D411B070000102852D5D01F2D343@exchtp03.via.com.tw>
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 */