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-i386.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-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 6b51f38..c14fc3b 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -782,9 +782,6 @@ static bfd_boolean elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { struct elf_i386_link_hash_table *htab; - asection * s; - int flags; - const struct elf_backend_data *bed = get_elf_backend_data (dynobj); htab = elf_i386_hash_table (info); if (!htab->sgot && !create_got_section (dynobj, info)) @@ -803,17 +800,9 @@ elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) || (!info->shared && !htab->srelbss)) abort (); - if (htab->is_vxworks && !info->shared) - { - s = bfd_make_section (dynobj, ".rel.plt.unloaded"); - flags = (SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_READONLY - | SEC_LINKER_CREATED); - if (s == NULL - || ! bfd_set_section_flags (dynobj, s, flags) - || ! bfd_set_section_alignment (dynobj, s, bed->s->log_file_align)) - return FALSE; - htab->srelplt2 = s; - } + if (htab->is_vxworks + && !elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2)) + return FALSE; return TRUE; } @@ -2000,21 +1989,6 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else htab->tls_ldm_got.offset = -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->splt->flags & SEC_CODE) - htab->elf.hplt->type = STT_FUNC; - } - } - /* Allocate global sym .plt and .got entries, and space for global sym dynamic relocs. */ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info); |