aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-ppc.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6e02f61..194b4da 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
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;
}