From c87f1ff7eb5a2e44ae4f4e3757dc73427a8b6458 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 15 Jan 2003 15:54:51 +0000 Subject: * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a relocation against a non-allocated readonly section. --- bfd/elf32-ppc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bfd/elf32-ppc.c') diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index c8aae88..e1278c7 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -2068,7 +2068,6 @@ ppc_elf_size_dynamic_sections (output_bfd, info) { if (!add_dynamic_entry (DT_TEXTREL, 0)) return FALSE; - info->flags |= DF_TEXTREL; } } #undef add_dynamic_entry @@ -2437,7 +2436,8 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) || ! bfd_set_section_alignment (dynobj, sreloc, 2)) return FALSE; } - if (sec->flags & SEC_READONLY) + if ((sec->flags & (SEC_READONLY | SEC_ALLOC)) + == (SEC_READONLY | SEC_ALLOC)) info->flags |= DF_TEXTREL; } -- cgit v1.1