This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 8/9] [ARC] Fixed condition to generate TEXTREL.
- From: Cupertino Miranda <Cupertino dot Miranda at synopsys dot com>
- To: binutils at sourceware dot org
- Cc: Cupertino dot Miranda at synopsys dot com, Claudiu dot Zissulescu at synopsys dot com, Francois dot Bedard at synopsys dot com
- Date: Tue, 23 May 2017 17:40:55 +0200
- Subject: [PATCH 8/9] [ARC] Fixed condition to generate TEXTREL.
- Authentication-results: sourceware.org; auth=none
- References: <20170523154056.19234-1-cmiranda@synopsys.com>
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 <cmiranda@synopsys.com>
* elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
require TEXTREL.
---
bfd/elf32-arc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 928dd68..5f8c69f 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -2643,7 +2643,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.9.0