From: Paul Brook Date: Tue, 5 Jul 2005 16:52:48 +0000 (+0000) Subject: 2005-07-05 Paul Brook X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5e3d971f0e5b8e6e50d2dd17eb546f4b34de8e8;p=binutils-gdb.git 2005-07-05 Paul Brook * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove. (ppc_elf_vxworks_get_sec_type_attr): New function. (elf_backend_special_sections): Remove vxwords definition. (elf_backend_get_sec_type_attr): Define for vxworks. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 67a8e795599..9219cf3d764 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,8 +1,15 @@ +2005-07-05 Paul Brook + + * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove. + (ppc_elf_vxworks_get_sec_type_attr): New function. + (elf_backend_special_sections): Remove vxwords definition. + (elf_backend_get_sec_type_attr): Define for vxworks. + 2005-07-05 Nick Clifton * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo. -2005-05-07 Paul Brook +2005-07-05 Paul Brook * config.bfd: Add separate case for ppc-vxworks. * configure: Regenerate. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 451e89f9e57..9c61644b592 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -7388,39 +7388,18 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, #undef TARGET_BIG_NAME #define TARGET_BIG_NAME "elf32-powerpc-vxworks" -/* This is the same as ppc_elf_special_sections except it does not include - the entry for .plt. */ -static struct bfd_elf_special_section const * - ppc_elf_vxworks_special_sections[27]= +/* VxWorks uses the elf default section flags for .plt. */ +static const struct bfd_elf_special_section * +ppc_elf_vxworks_get_sec_type_attr (bfd *abfd ATTRIBUTE_UNUSED, asection *sec) { - NULL, /* 'a' */ - NULL, /* 'b' */ - NULL, /* 'c' */ - NULL, /* 'd' */ - NULL, /* 'e' */ - NULL, /* 'f' */ - NULL, /* 'g' */ - NULL, /* 'h' */ - NULL, /* 'i' */ - NULL, /* 'j' */ - NULL, /* 'k' */ - NULL, /* 'l' */ - NULL, /* 'm' */ - NULL, /* 'n' */ - NULL, /* 'o' */ - NULL, /* 'p' */ - NULL, /* 'q' */ - NULL, /* 'r' */ - ppc_special_sections_s, /* 's' */ - ppc_special_sections_t, /* 's' */ - NULL, /* 'u' */ - NULL, /* 'v' */ - NULL, /* 'w' */ - NULL, /* 'x' */ - NULL, /* 'y' */ - NULL, /* 'z' */ - ppc_special_sections_other, /* other */ -}; + if (sec->name == NULL) + return NULL; + + if (strcmp (sec->name, ".plt") == 0) + return _bfd_elf_get_sec_type_attr (abfd, sec); + + return ppc_elf_get_sec_type_attr (abfd, sec); +} /* Like ppc_elf_link_hash_table_create, but overrides appropriately for VxWorks. */ @@ -7501,9 +7480,6 @@ ppc_elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker) #undef bfd_elf32_bfd_link_hash_table_create #define bfd_elf32_bfd_link_hash_table_create \ ppc_elf_vxworks_link_hash_table_create -#undef elf_backend_special_sections -#define elf_backend_special_sections \ - ppc_elf_vxworks_special_sections #undef elf_backend_add_symbol_hook #define elf_backend_add_symbol_hook \ ppc_elf_vxworks_add_symbol_hook @@ -7513,6 +7489,9 @@ ppc_elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker) #undef elf_backend_final_write_processing #define elf_backend_final_write_processing \ ppc_elf_vxworks_final_write_processing +#undef elf_backend_get_sec_type_attr +#define elf_backend_get_sec_type_attr \ + ppc_elf_vxworks_get_sec_type_attr #undef elf_backend_emit_relocs #define elf_backend_emit_relocs \ elf_vxworks_emit_relocs