aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-07-29 02:46:04 +0000
committerAlan Modra <amodra@gmail.com>2005-07-29 02:46:04 +0000
commit8a69675106de19439ba277ce987a9535e5a6fce4 (patch)
tree9befa7bd097c8015aef9be13d009c5844b8a31a8 /bfd/elflink.c
parent8655b342bf234ed946924bccd87288163022996b (diff)
downloadgdb-8a69675106de19439ba277ce987a9535e5a6fce4.zip
gdb-8a69675106de19439ba277ce987a9535e5a6fce4.tar.gz
gdb-8a69675106de19439ba277ce987a9535e5a6fce4.tar.bz2
* elf-bfd.h (struct elf_backend_data): Add action_discarded.
(enum action_discarded): Move from.. * elflink.c (enum action_discarded): ..here. (_bfd_elf_default_action_discarded): Rename from elf_action_discarded. Remove target specific section checks. (elf_link_input_bfd): Adjust. * elfxx-target.h (elf_backend_action_discarded): Define. (elfNN_bed): Init new field. * bfd-in.h (_bfd_elf_default_action_discarded): Declare. * bfd-in2.h: Regenerate. * elf-hppa.h (elf_hppa_action_discarded): New function. * elf32-hppa.c (elf_backend_action_discarded): Define. * elf64-hppa.c (elf_backend_action_discarded): Define. * elf32-ppc.c (ppc_elf_action_discarded): New function. (elf_backend_action_discarded): Define.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 62f80c9..092119a 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -6690,12 +6690,6 @@ elf_section_ignore_discarded_relocs (asection *sec)
return FALSE;
}
-enum action_discarded
- {
- COMPLAIN = 1,
- PRETEND = 2
- };
-
/* Return a mask saying how ld should treat relocations in SEC against
symbols defined in discarded sections. If this function returns
COMPLAIN set, ld will issue a warning message. If this function
@@ -6705,8 +6699,8 @@ enum action_discarded
zero the reloc (at least that is the intent, but some cooperation by
the target dependent code is needed, particularly for REL targets). */
-static unsigned int
-elf_action_discarded (asection *sec)
+unsigned int
+_bfd_elf_default_action_discarded (asection *sec)
{
if (sec->flags & SEC_DEBUGGING)
return PRETEND;
@@ -6717,12 +6711,6 @@ elf_action_discarded (asection *sec)
if (strcmp (".gcc_except_table", sec->name) == 0)
return 0;
- if (strcmp (".PARISC.unwind", sec->name) == 0)
- return 0;
-
- if (strcmp (".fixup", sec->name) == 0)
- return 0;
-
return COMPLAIN | PRETEND;
}
@@ -7042,7 +7030,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
if (!elf_section_ignore_discarded_relocs (o))
{
Elf_Internal_Rela *rel, *relend;
- unsigned int action = elf_action_discarded (o);
+ unsigned int action = (*bed->action_discarded) (o);
rel = internal_relocs;
relend = rel + o->reloc_count * bed->s->int_rels_per_ext_rel;