aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-06-05 05:30:25 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-06-05 05:30:25 -0700
commit981f151804e47290f4dcff507aeb530b3334ac17 (patch)
tree2978359b579f2807405c1a896ea045b2efdda968
parent82f06518c463badebdab653a7af4e4427c786742 (diff)
downloadgdb-981f151804e47290f4dcff507aeb530b3334ac17.zip
gdb-981f151804e47290f4dcff507aeb530b3334ac17.tar.gz
gdb-981f151804e47290f4dcff507aeb530b3334ac17.tar.bz2
bfin: Skip non SEC_ALLOC section
* elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC section.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-bfin.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 011a49d..4971b87 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index b06daf5..e067cde 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -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,