diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2006-03-02 08:57:00 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2006-03-02 08:57:00 +0000 |
commit | 711de32caaff12a33dfcc10c0421388c7550bac0 (patch) | |
tree | 4356412f348c7c16a25aff55d8b5af2c9d50011f /bfd/elf32-ppc.c | |
parent | 83503a060f6c6afe5b411f0056a8c826b6bb3f5a (diff) | |
download | gdb-711de32caaff12a33dfcc10c0421388c7550bac0.zip gdb-711de32caaff12a33dfcc10c0421388c7550bac0.tar.gz gdb-711de32caaff12a33dfcc10c0421388c7550bac0.tar.bz2 |
bfd/
* elf32-i386.c (elf_i386_create_dynamic_sections): Use
elf_vxworks_create_dynamic_sections.
(elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT
symbol handling.
* elf32-ppc.c (ppc_elf_create_dynamic_sections): Use
elf_vxworks_create_dynamic_sections.
(ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT
symbol handling.
* elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function.
* elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare.
ld/testsuite/
* ld-i386/ld-i386/vxworks1-lib.nd: New test.
* ld-i386/i386.exp: Run it.
* ld-powerpc/ld-powerpc/vxworks1-lib.nd: New test.
* ld-powerpc/powerc.exp: Run it.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 353f288..68cead2 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -2548,19 +2548,9 @@ ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) return FALSE; } - /* Create the section for VxWorks static plt relocations. */ - if (htab->is_vxworks && !info->shared) - { - s = bfd_make_section (abfd, ".rela.plt.unloaded"); - flags = (SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_READONLY - | SEC_LINKER_CREATED); - if (s == NULL - || ! bfd_set_section_flags (abfd, s, flags) - || ! bfd_set_section_alignment (abfd, s, - get_elf_backend_data (abfd)->s->log_file_align)) - return FALSE; - htab->srelplt2 = s; - } + if (htab->is_vxworks + && !elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2)) + return FALSE; htab->relplt = bfd_get_section_by_name (abfd, ".rela.plt"); htab->plt = s = bfd_get_section_by_name (abfd, ".plt"); @@ -4764,21 +4754,6 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else htab->tlsld_got.offset = (bfd_vma) -1; - if (htab->is_vxworks) - { - /* Mark the GOT and PLT symbols as having relocations; they might - not, but we won't know for sure until we build the GOT in - finish_dynamic_symbol. */ - if (htab->elf.hgot) - htab->elf.hgot->indx = -2; - if (htab->elf.hplt) - { - htab->elf.hplt->indx = -2; - if (htab->plt->flags & SEC_CODE) - htab->elf.hplt->type = STT_FUNC; - } - } - /* Allocate space for global sym dynamic relocs. */ elf_link_hash_traverse (elf_hash_table (info), allocate_dynrelocs, info); |