diff options
author | Alan Modra <amodra@gmail.com> | 2002-02-12 06:31:29 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-02-12 06:31:29 +0000 |
commit | 19397422908c5e57387c3ccad9e0c7576a138c64 (patch) | |
tree | 9eb7b116654d26aa22b15dd501ecaf614bca4766 /bfd | |
parent | 9b90b531ee9a5014db5732b7954510a2df39253b (diff) | |
download | gdb-19397422908c5e57387c3ccad9e0c7576a138c64.zip gdb-19397422908c5e57387c3ccad9e0c7576a138c64.tar.gz gdb-19397422908c5e57387c3ccad9e0c7576a138c64.tar.bz2 |
Add DT_PPC64_OPD and DT_PPC64_OPDSZ dynamic tags
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 22 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 27 |
2 files changed, 36 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6e48ed9..a8d4b87 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2002-02-12 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic + DT_PPC64_OPD and DT_PPC64_OPDSZ tags. + (ppc64_elf_finish_dynamic_sections): Set values for them. + 2002-02-11 Alexandre Oliva <aoliva@redhat.com> * elf32-sh.c: Added missing prototypes. @@ -467,14 +473,14 @@ 2002-01-31 Philipp Thomas <pthomas@suse.de> - * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR - to front of message. Unify messages with elf32-arm.h. Use - commas where neccessary. - * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase - ERROR in messages. Unify messages with coff-arm.c. Correct - VFP/FPA error message. - (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and - APCS-32 for translation. + * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR + to front of message. Unify messages with elf32-arm.h. Use + commas where neccessary. + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase + ERROR in messages. Unify messages with coff-arm.c. Correct + VFP/FPA error message. + (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and + APCS-32 for translation. 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com> diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index a945f5c..e0fb9bf 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -156,11 +156,8 @@ static boolean ppc64_elf_finish_dynamic_sections /* Since .opd is an array of descriptors and each entry will end up with identical R_PPC64_RELATIVE relocs, there is really no need to propagate .opd relocs; The dynamic linker should be taught to - relocate .opd without reloc entries. FIXME: the dynamic linker - will need to know where and how large .opd is via a couple of new - DT_PPC64_* tags, or perhaps just with one reloc that specifies the - start of .opd via its offset and the size via its addend. Also, - .opd should be trimmed of unused values. */ + relocate .opd without reloc entries. FIXME: .opd should be trimmed + of unused values. */ #ifndef NO_OPD_RELOCS #define NO_OPD_RELOCS 0 #endif @@ -3128,6 +3125,13 @@ ppc64_elf_size_dynamic_sections (output_bfd, info) return false; } + if (NO_OPD_RELOCS) + { + if (!add_dynamic_entry (DT_PPC64_OPD, 0) + || !add_dynamic_entry (DT_PPC64_OPDSZ, 0)) + return false; + } + if (relocs) { if (!add_dynamic_entry (DT_RELA, 0) @@ -4354,6 +4358,7 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info) for (; dyncon < dynconend; dyncon++) { Elf_Internal_Dyn dyn; + asection *s; bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn); @@ -4367,6 +4372,18 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info) + htab->sglink->output_offset); break; + case DT_PPC64_OPD: + s = bfd_get_section_by_name (output_bfd, ".opd"); + if (s != NULL) + dyn.d_un.d_ptr = s->vma; + break; + + case DT_PPC64_OPDSZ: + s = bfd_get_section_by_name (output_bfd, ".opd"); + if (s != NULL) + dyn.d_un.d_val = s->_raw_size; + break; + case DT_PLTGOT: dyn.d_un.d_ptr = (htab->splt->output_section->vma + htab->splt->output_offset); |