From 64aa8e030360ba68e32ca15fa5aa426160a2efb1 Mon Sep 17 00:00:00 2001 From: Cupertino Miranda Date: Wed, 5 Apr 2017 23:22:07 +0200 Subject: [PATCH] [ARC] Fixed condition to generate TEXTREL. TEXTREL was being generated even when relocatable .o files had the .rela.text section. Now it is limitted only to dynamic object files that still have them. Nevertheless, our target aborts in those cases due to architecture limitations where icache is not coherent with dcache, and to force this coherence expensive kernel level support would be needed. bfd/ChangeLog: Cupertino Miranda * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to require TEXTREL. --- bfd/ChangeLog | 5 +++++ bfd/elf32-arc.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7fb198a7d6..6c4baf800c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2017-06-08 Cupertino Miranda + + * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to + require TEXTREL. + 2017-06-08 Cupertino Miranda * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index c1286b2d61..03c00c38a6 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -2647,7 +2647,8 @@ elf_arc_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, const char *name = s->name + 5; bfd *ibfd; for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next) - if (bfd_get_flavour (ibfd) == bfd_target_elf_flavour) + if (bfd_get_flavour (ibfd) == bfd_target_elf_flavour + && ibfd->flags & DYNAMIC) { asection *target = bfd_get_section_by_name (ibfd, name); if (target != NULL -- 2.34.1