]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
include/elf/
authorAlan Modra <amodra@gmail.com>
Sat, 14 May 2005 05:07:20 +0000 (05:07 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 14 May 2005 05:07:20 +0000 (05:07 +0000)
* ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK.
bfd/
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
not DT_PPC_GLINK.
(ppc_elf_finish_dynamic_sections): Likewise.
binutils/
* readelf.c (get_ppc_dynamic_type): Display DT_PPC_GOT, not
DT_PPC_GLINK.

bfd/ChangeLog
bfd/elf32-ppc.c
binutils/ChangeLog
binutils/readelf.c
include/elf/ChangeLog
include/elf/ppc.h

index 167c42d739a2ffae1ce56faf9b839a3edafbbcbd..e53946efe8fb7af5425ca7453d63a73fe9458b49 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-14  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
+       not DT_PPC_GLINK.
+       (ppc_elf_finish_dynamic_sections): Likewise.
+
 2005-05-13  Fred Fish  <fnf@specifixinc.com>
 
        * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
index bc19406c4467f0a40ac86a4b0435f1b17e9f9dc7..67e7677c75f27f6be30ff760bd5f824586d18356 100644 (file)
@@ -4406,7 +4406,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
       if (htab->glink != NULL && htab->glink->size != 0)
        {
-         if (!add_dynamic_entry (DT_PPC_GLINK, 0))
+         if (!add_dynamic_entry (DT_PPC_GOT, 0))
            return FALSE;
        }
 
@@ -6313,6 +6313,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
 {
   asection *sdyn;
   struct ppc_elf_link_hash_table *htab;
+  bfd_vma got;
 
 #ifdef DEBUG
   fprintf (stderr, "ppc_elf_finish_dynamic_sections called\n");
@@ -6321,6 +6322,12 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
   htab = ppc_elf_hash_table (info);
   sdyn = bfd_get_section_by_name (htab->elf.dynobj, ".dynamic");
 
+  got = 0;
+  if (htab->elf.hgot != NULL)
+    got = (htab->elf.hgot->root.u.def.value
+          + htab->elf.hgot->root.u.def.section->output_section->vma
+          + htab->elf.hgot->root.u.def.section->output_offset);
+
   if (htab->elf.dynamic_sections_created)
     {
       Elf32_External_Dyn *dyncon, *dynconend;
@@ -6352,10 +6359,8 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
              dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
              break;
 
-           case DT_PPC_GLINK:
-             s = htab->glink;
-             dyn.d_un.d_ptr = (s->size - GLINK_PLTRESOLVE
-                               + s->output_section->vma + s->output_offset);
+           case DT_PPC_GOT:
+             dyn.d_un.d_ptr = got;
              break;
 
            default:
@@ -6389,7 +6394,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
     {
       unsigned char *p;
       unsigned char *endp;
-      bfd_vma got, pltgot;
+      bfd_vma pltgot;
       unsigned int i;
       static const unsigned int plt_resolve[] =
        {
@@ -6409,10 +6414,6 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
 #define PPC_HI(v) (((v) >> 16) & 0xffff)
 #define PPC_HA(v) PPC_HI ((v) + 0x8000)
 
-      got = (htab->elf.hgot->root.u.def.value
-            + htab->elf.hgot->root.u.def.section->output_section->vma
-            + htab->elf.hgot->root.u.def.section->output_offset);
-
       pltgot = (htab->plt->output_section->vma
                + htab->plt->output_offset
                - got);
index f2fbd37cb73aa905e4cee7582871d793dcc478a6..f3262f97cd68a5fb235a7e681d20895f4ec3037f 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-14  Alan Modra  <amodra@bigpond.net.au>
+
+       * readelf.c (get_ppc_dynamic_type): Display DT_PPC_GOT, not
+       DT_PPC_GLINK.
+
 2005-05-13  Fred Fish  <fnf@specifixinc.com>
 
        * readelf.c: Fix a couple of obvious comment typos,
index 3b086cb1f76a88d34e0c43db47c9e52ae3c30112..089184759901ffa00a314d4f9f37a0d9afb4b88b 100644 (file)
@@ -1417,7 +1417,7 @@ get_ppc_dynamic_type (unsigned long type)
 {
   switch (type)
     {
-    case DT_PPC_GLINK: return "PPC_GLINK";
+    case DT_PPC_GOT: return "PPC_GOT";
     default:
       return NULL;
     }
index d9d736059ac3b2bb701a15cc954aa6c792e164ef..ab6c3c8dc6fcfa0775f47853db847fcd7166d841 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-14  Alan Modra  <amodra@bigpond.net.au>
+
+       * ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK.
+
 2005-05-11  Alan Modra  <amodra@bigpond.net.au>
 
        * ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
index 1ccbda34715730c97d66ae0aba6789463da9e185..ca5035274d9a6abb15156ea42e2569fea9d0f651 100644 (file)
@@ -145,8 +145,8 @@ END_RELOC_NUMBERS (R_PPC_max)
 #define IS_PPC_TLS_RELOC(R) \
   ((R) >= R_PPC_TLS && (R) <= R_PPC_GOT_DTPREL16_HA)
 
-/* Specify the start of the .glink section.  */
-#define DT_PPC_GLINK           DT_LOPROC
+/* Specify the value of _GLOBAL_OFFSET_TABLE_.  */
+#define DT_PPC_GOT             DT_LOPROC
 
 /* Processor specific flags for the ELF header e_flags field.  */