bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Linker bug report for ARC processor


From: Lucas Lin
Subject: RE: Linker bug report for ARC processor
Date: Sat, 6 Oct 2001 13:51:41 +0800

Dear Alan :

    Great !  You do a good job !!

    The patch really works and so far the new linker passed the
    testsuit which test for 3 linker bugs.

    Thanks.

-----Original Message-----
From: Alan Modra [mailto:address@hidden
Sent: Friday, October 05, 2001 8:39 PM
To: Lucas Lin
Cc: address@hidden; Nick Clifton; Rongwen Chang; Aaron Lin; Mark
Lu; address@hidden
Subject: 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  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]