* elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
authorAndreas Schwab <schwab@linux-m68k.org>
Wed, 15 Jan 2003 15:54:51 +0000 (15:54 +0000)
committerAndreas Schwab <schwab@linux-m68k.org>
Wed, 15 Jan 2003 15:54:51 +0000 (15:54 +0000)
relocation against a non-allocated readonly section.

bfd/ChangeLog
bfd/elf32-ppc.c

index 6e02f61dbe7290a78e4e81ac273759a47cf2bead..194b4da0aafc963338e15b692bcb76ecb20d68f8 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-15  Andreas Schwab  <schwab@suse.de>
+
+       * 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  <amodra@bigpond.net.au>
 
        * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
index c8aae885dbdf2823bd863f708e0e14808ebd5f29..e1278c7758fac17ae93477e60f8dd8d96e30924e 100644 (file)
@@ -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;
                }