diff options
author | Alan Modra <amodra@gmail.com> | 2005-07-29 02:46:04 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-07-29 02:46:04 +0000 |
commit | 8a69675106de19439ba277ce987a9535e5a6fce4 (patch) | |
tree | 9befa7bd097c8015aef9be13d009c5844b8a31a8 /bfd/elf32-ppc.c | |
parent | 8655b342bf234ed946924bccd87288163022996b (diff) | |
download | gdb-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/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 58afcda..6239438 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -5303,6 +5303,21 @@ ppc_elf_set_sdata_syms (bfd *obfd, struct bfd_link_info *info) _bfd_elf_provide_symbol (info, lsect->sym_name, val, s); } } + +/* What to do when ld finds relocations against symbols defined in + discarded sections. */ + +static unsigned int +ppc_elf_action_discarded (asection *sec) +{ + if (strcmp (".fixup", sec->name) == 0) + return 0; + + if (strcmp (".got2", sec->name) == 0) + return 0; + + return _bfd_elf_default_action_discarded (sec); +} /* Fill in the address for a pointer generated in a linker section. */ @@ -7360,6 +7375,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, #define elf_backend_write_section ppc_elf_write_section #define elf_backend_get_sec_type_attr ppc_elf_get_sec_type_attr #define elf_backend_plt_sym_val ppc_elf_plt_sym_val +#define elf_backend_action_discarded ppc_elf_action_discarded #include "elf32-target.h" |