diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2007-11-08 13:51:07 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2007-11-08 13:51:07 +0000 |
commit | 7a2b07ff7e6a3f34e8022a1a72c8a8e812c1da7b (patch) | |
tree | 3669cb0abc46ede1f142e0d7cec365c4f980f25e /bfd | |
parent | 11ac2671101d0cd443a67ab4064e5af55bf410e0 (diff) | |
download | gdb-7a2b07ff7e6a3f34e8022a1a72c8a8e812c1da7b.zip gdb-7a2b07ff7e6a3f34e8022a1a72c8a8e812c1da7b.tar.gz gdb-7a2b07ff7e6a3f34e8022a1a72c8a8e812c1da7b.tar.bz2 |
include/elf/
* vxworks.h: New.
bfd/
* elf-vxworks.h (elf_vxworks_add_dynamic_entries): Declare.
(elf_vxworks_finish_dynamic_entry): Declare.
* elf-vxworks.c: Include elf/vxworks.h.
(elf_vxworks_add_dynamic_entries): New.
(elf_vxworks_finish_dynamic_entry): New.
* Makefile.am (elf-vxworks.lo): Add dependency.
* Makefile.in (elf-vxworks.lo): Add dependency.
* elf32-i386.c (elf_i386_size_dynamic_sections,
elf_i386_finish_dynamic_sections): Call
elf_vxworks_add_dynamic_entries and
elf_vxworks_finish_dynamic_entry.
* elf32-ppc.c (ppc_elf_size_dynamic_sections,
ppc_elf_finish_dynamic_sections): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections,
sparc_finish_dyn): Likewise.
* elf32-sh.c (sh_elf_size_dynamic_sections,
sh_elf_finish_dynamic_sections): Likewise.
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections,
_bfd_mips_elf_finish_dynamic_sections): Likewise.
* elf32-arm.c (elf32_arm_size_dynamic_sections,
elf32_arm_finish_dynamic_sections): Likewise.
ld/
* ld-vxworks/tls-2.d: New.
* ld-vxworks/tls-2.s: New.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 24 | ||||
-rw-r--r-- | bfd/Makefile.am | 2 | ||||
-rw-r--r-- | bfd/Makefile.in | 2 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 6 | ||||
-rw-r--r-- | bfd/elf32-i386.c | 6 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 8 | ||||
-rw-r--r-- | bfd/elf32-sh.c | 6 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 6 | ||||
-rw-r--r-- | bfd/elfxx-sparc.c | 6 |
9 files changed, 63 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b05c8ee..5b37351 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,27 @@ +2007-11-08 Nathan Sidwell <nathan@codesourcery.com> + + * elf-vxworks.h (elf_vxworks_add_dynamic_entries): Declare. + (elf_vxworks_finish_dynamic_entry): Declare. + * elf-vxworks.c: Include elf/vxworks.h. + (elf_vxworks_add_dynamic_entries): New. + (elf_vxworks_finish_dynamic_entry): New. + * Makefile.am (elf-vxworks.lo): Add dependency. + * Makefile.in (elf-vxworks.lo): Add dependency. + * elf32-i386.c (elf_i386_size_dynamic_sections, + elf_i386_finish_dynamic_sections): Call + elf_vxworks_add_dynamic_entries and + elf_vxworks_finish_dynamic_entry. + * elf32-ppc.c (ppc_elf_size_dynamic_sections, + ppc_elf_finish_dynamic_sections): Likewise. + * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections, + sparc_finish_dyn): Likewise. + * elf32-sh.c (sh_elf_size_dynamic_sections, + sh_elf_finish_dynamic_sections): Likewise. + * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections, + _bfd_mips_elf_finish_dynamic_sections): Likewise. + * elf32-arm.c (elf32_arm_size_dynamic_sections, + elf32_arm_finish_dynamic_sections): Likewise. + 2007-11-07 Olivier Hainque <hainque@adacore.com> * bfd/elfxx-mips.c (_bfd_mips_elf_fake_sections): Force diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 3d92dae..0ee4e3e 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -1580,7 +1580,7 @@ elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \ elf-vxworks.lo: elf-vxworks.c $(INCDIR)/filenames.h \ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - elf-vxworks.h + $(INCDIR)/elf/vxworks.h elf-vxworks.h epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \ coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 3e5ee0a..df0e45a 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -2160,7 +2160,7 @@ elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \ elf-vxworks.lo: elf-vxworks.c $(INCDIR)/filenames.h \ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - elf-vxworks.h + $(INCDIR)/elf/vxworks.h elf-vxworks.h epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \ coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index cbde697..0e8e423 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -8723,6 +8723,9 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, if (!add_dynamic_entry (DT_TEXTREL, 0)) return FALSE; } + if (htab->vxworks_p + && !elf_vxworks_add_dynamic_entries (output_bfd, info)) + return FALSE; } #undef add_dynamic_entry @@ -9065,6 +9068,9 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info unsigned int type; default: + if (htab->vxworks_p + && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn)) + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; case DT_HASH: diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index e2396ce..802c2b1 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -2374,6 +2374,9 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, return FALSE; } } + if (htab->is_vxworks + && !elf_vxworks_add_dynamic_entries (output_bfd, info)) + return FALSE; } #undef add_dynamic_entry @@ -3796,6 +3799,9 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, switch (dyn.d_tag) { default: + if (htab->is_vxworks + && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn)) + break; continue; case DT_PLTGOT: diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 17978a0..69cc740 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -5188,7 +5188,10 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (!add_dynamic_entry (DT_TEXTREL, 0)) return FALSE; } - } + if (htab->is_vxworks + && !elf_vxworks_add_dynamic_entries (output_bfd, info)) + return FALSE; + } #undef add_dynamic_entry return TRUE; @@ -7353,6 +7356,9 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, continue; default: + if (htab->is_vxworks + && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn)) + break; continue; } diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 3d4a2ff..24ac5bb 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -3138,6 +3138,9 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, return FALSE; } } + if (htab->vxworks_p + && !elf_vxworks_add_dynamic_entries (output_bfd, info)) + return FALSE; } #undef add_dynamic_entry @@ -5763,6 +5766,9 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) switch (dyn.d_tag) { default: + if (htab->vxworks_p + && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn)) + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; #ifdef INCLUDE_SHMEDIA diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index c571077..217cd92 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -7674,6 +7674,9 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0)) return FALSE; } + if (htab->is_vxworks + && !elf_vxworks_add_dynamic_entries (output_bfd, info)) + return FALSE; } return TRUE; @@ -8901,6 +8904,9 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, default: swap_out_p = FALSE; + if (htab->is_vxworks + && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn)) + swap_out_p = TRUE; break; } diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 736f044..79f8f86 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -2396,6 +2396,9 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, eht->dynsymcount++; } } + if (htab->is_vxworks + && !elf_vxworks_add_dynamic_entries (output_bfd, info)) + return FALSE; } #undef add_dynamic_entry @@ -3846,6 +3849,9 @@ sparc_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bed->s->swap_dyn_out (output_bfd, &dyn, dyncon); } } + else if (htab->is_vxworks + && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn)) + bed->s->swap_dyn_out (output_bfd, &dyn, dyncon); else if (abi_64_p && dyn.d_tag == DT_SPARC_REGISTER) { if (stt_regidx == -1) |