[binutils-gdb] [ARC] Update warning reporting.

Claudiu Zissulescu claziss@sourceware.org
Mon Aug 6 13:46:00 GMT 2018


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

commit 6af0448446f9212df4dc62e7618174d5d3f5e43e
Author: Claudiu Zissulescu <claziss@gmail.com>
Date:   Mon Aug 6 16:41:32 2018 +0300

    [ARC] Update warning reporting.
    
    MWDT compiler doesn't use eflags and makes use of 0x0c section. For
    those, silence the gnu warning system.
    
    bfd/
      Claudiu Zissulescu <claziss@synopsys.com>
    
            * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
            efalgs only when in/out exists.
            (elf32_arc_section_from_shdr): Don't complain about 0x0c section
            type.  It is mwdt compiler specific.

Diff:
---
 bfd/ChangeLog   |  7 +++++++
 bfd/elf32-arc.c | 17 ++++++++++-------
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 98f0f17..b12e024 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
 2018-08-06  Claudiu Zissulescu  <claziss@synopsys.com>
 
+	* elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
+	efalgs only when in/out exists.
+	(elf32_arc_section_from_shdr): Don't complain about 0x0c
+	section type.  It is mwdt compiler specific.
+
+2018-08-06  Claudiu Zissulescu  <claziss@synopsys.com>
+
 	* elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
 
 2018-08-06  Claudiu Zissulescu  <claziss@synopsys.com>
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 25c9666..62366a7 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -917,14 +917,16 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 	       && !bfd_elf_get_obj_attr_int (ibfd, OBJ_ATTR_PROC,
 					     Tag_ARC_CPU_base))
 	{
-	  /* Warn if different flags.  */
-	  _bfd_error_handler
-	    /* xgettext:c-format */
-	    (_("%pB: uses different e_flags (%#x) fields than "
-	       "previous modules (%#x)"),
-	     ibfd, in_flags, out_flags);
 	  if (in_flags && out_flags)
-	    return FALSE;
+	    {
+	      /* Warn if different flags.  */
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%pB: uses different e_flags (%#x) fields than "
+		   "previous modules (%#x)"),
+		 ibfd, in_flags, out_flags);
+	      return FALSE;
+	    }
 	  /* MWDT doesnt set the eflags hence make sure we choose the
 	     eflags set by gcc.  */
 	  in_flags = in_flags > out_flags ? in_flags : out_flags;
@@ -2894,6 +2896,7 @@ elf32_arc_section_from_shdr (bfd *abfd,
 {
   switch (hdr->sh_type)
     {
+    case 0x0c: /* MWDT specific section, don't complain about it.  */
     case SHT_ARC_ATTRIBUTES:
       break;



More information about the Binutils-cvs mailing list