This is the mail archive of the binutils-cvs@sourceware.org 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]

[binutils-gdb] ARC port broken reloc processing


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0a5ff21b13783cef3b26680d1673b1ae37697aeb

commit 0a5ff21b13783cef3b26680d1673b1ae37697aeb
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Dec 1 11:10:23 2015 +1030

    ARC port broken reloc processing
    
    This initialises howto.dst_mask so that relocations in debug sections
    are applied by the generic reloc processing used by objdump to display
    debug sections.
    
    	* elf32-arc.c (arc_elf_howto_init): Init dst_mask.

Diff:
---
 bfd/ChangeLog   | 4 ++++
 bfd/elf32-arc.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b87f914..03a72d2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2015-12-01  Cupertino Miranda  <cupertino.miranda@synopsys.com>
+
+	* elf32-arc.c (arc_elf_howto_init): Init dst_mask.
+
 2015-11-20  Stefan Teleman  <stefan.teleman@oracle.com>
 
 	PR ld/19260
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 37a426c..c02db9d 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -230,7 +230,8 @@ static void arc_elf_howto_init (void)
 {
 #define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
   elf_arc_howto_table[TYPE].pc_relative = \
-    (strstr (#FORMULA, " P ") != NULL || strstr (#FORMULA, " PDATA ") != NULL);
+    (strstr (#FORMULA, " P ") != NULL || strstr (#FORMULA, " PDATA ") != NULL); \
+  elf_arc_howto_table[TYPE].dst_mask = RELOC_FUNCTION(0, ~0);
 
   #include "elf/arc-reloc.def"
 }


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