bfin: Skip non SEC_ALLOC section
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 5 Jun 2020 12:30:25 +0000 (05:30 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 5 Jun 2020 12:30:25 +0000 (05:30 -0700)
* elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
section.

bfd/ChangeLog
bfd/elf32-bfin.c

index 011a49d5ecd6d0c0ff195dcce9f9ea975c352e88..4971b878285aa39e851043d3bc991e4194e10827 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
+       section.
+
 2020-06-05  Nick Clifton  <nickc@redhat.com>
 
        * pdp11.c (aout_link_add_symbols): Fix use before initialisation
index b06daf507ed7ed5c1764e8a33b2eac3f47816a59..e067cdeaad9a28c775a3820aebe659f8663dc92e 100644 (file)
@@ -2614,6 +2614,9 @@ bfinfdpic_relocate_section (bfd * output_bfd,
        case R_BFIN_FUNCDESC_GOTOFFLO:
        case R_BFIN_FUNCDESC:
        case R_BFIN_FUNCDESC_VALUE:
+         if ((input_section->flags & SEC_ALLOC) == 0)
+           break;
+
          if (h != NULL)
            picrel = bfinfdpic_relocs_info_for_global (bfinfdpic_relocs_info
                                                       (info), input_bfd, h,