From: Andreas Schwab Date: Wed, 15 Jan 2003 15:54:51 +0000 (+0000) Subject: * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c87f1ff7eb5a2e44ae4f4e3757dc73427a8b6458;p=binutils-gdb.git * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a relocation against a non-allocated readonly section. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6e02f61dbe7..194b4da0aaf 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-01-15 Andreas Schwab + + * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a + relocation against a non-allocated readonly section. + 2003-01-10 Alan Modra * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index c8aae885dbd..e1278c7758f 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; }