[binutils-gdb] [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[binutils-gdb] [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

gdb-buildbot
*** TEST RESULTS FOR COMMIT b00a0a86c40c681cf4b22a3630f85188ac849721 ***

commit b00a0a86c40c681cf4b22a3630f85188ac849721
Author:     Alan Modra <[hidden email]>
AuthorDate: Thu Jul 18 10:58:01 2019 +0930
Commit:     Alan Modra <[hidden email]>
CommitDate: Thu Jul 18 22:17:30 2019 +0930

    [PowerPC] Rename TLS_TPRELGD to TLS_GDIE
   
    Choose a better name, that reflects why the flag is set (GD to IE
    optimisation) rather than what the flag produces (TPREL64 reloc on
    a single GOT entry replacing a tls_index pair).
   
            * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
            Correct comment.
            * elf64-ppc.c (TLS_GDIE): Likewise.

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index bbef105a2c..b913d18d8e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2019-07-18  Alan Modra  <[hidden email]>
+
+ * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
+ Correct comment.
+ * elf64-ppc.c (TLS_GDIE): Likewise.
+
 2019-07-18  Alan Modra  <[hidden email]>
 
  * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 33ab4e0d68..8dfeca3e3a 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2111,9 +2111,7 @@ struct ppc_elf_link_hash_entry
      of the other TLS bits are set.  tls_optimize clears bits when
      optimizing to indicate the corresponding GOT entry type is not
      needed.  If set, TLS_TLS is never cleared.  tls_optimize may also
-     set TLS_TPRELGD when a GD reloc turns into a TPREL one.  We use a
-     separate flag rather than setting TPREL just for convenience in
-     distinguishing the two cases.
+     set TLS_GDIE when a GD reloc turns into an IE one.
      These flags are also kept for local symbols.  */
 #define TLS_TLS 1 /* Any TLS reloc.  */
 #define TLS_GD 2 /* GD reloc. */
@@ -2121,7 +2119,7 @@ struct ppc_elf_link_hash_entry
 #define TLS_TPREL 8 /* TPREL reloc, => IE. */
 #define TLS_DTPREL 16 /* DTPREL reloc, => LD. */
 #define TLS_MARK 32 /* __tls_get_addr call marked. */
-#define TLS_TPRELGD 64 /* TPREL reloc resulting from GD->IE. */
+#define TLS_GDIE 64 /* GOT TPREL reloc resulting from GD->IE. */
   unsigned char tls_mask;
 
   /* The above field is also used to mark function symbols.  In which
@@ -4525,7 +4523,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
  tls_set = 0;
       else
  /* GD -> IE */
- tls_set = TLS_TLS | TLS_TPRELGD;
+ tls_set = TLS_TLS | TLS_GDIE;
       tls_clear = TLS_GD;
       break;
 
@@ -5051,7 +5049,7 @@ got_entries_needed (int tls_mask)
       need = 0;
       if ((tls_mask & TLS_GD) != 0)
  need += 8;
-      if ((tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
+      if ((tls_mask & (TLS_TPREL | TLS_GDIE)) != 0)
  need += 4;
       if ((tls_mask & TLS_DTPREL) != 0)
  need += 4;
@@ -5072,7 +5070,7 @@ got_relocs_needed (int tls_mask, unsigned int need, bfd_boolean known)
      condition as that for IE, but ld.so needs to differentiate
      LD and GD entries.  */
   if (known && (tls_mask & TLS_TLS) != 0
-      && (tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
+      && (tls_mask & (TLS_TPREL | TLS_GDIE)) != 0)
     need -= 4;
   return need * sizeof (Elf32_External_Rela) / 4;
 }
@@ -7213,7 +7211,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
 
  case R_PPC_GOT_TLSGD16_HI:
  case R_PPC_GOT_TLSGD16_HA:
-  tls_gd = TLS_TPRELGD;
+  tls_gd = TLS_GDIE;
   if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_GD) == 0)
     goto tls_gdld_hi;
   break;
@@ -7238,7 +7236,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
 
  case R_PPC_GOT_TLSGD16:
  case R_PPC_GOT_TLSGD16_LO:
-  tls_gd = TLS_TPRELGD;
+  tls_gd = TLS_GDIE;
   if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_GD) == 0)
     goto tls_ldgd_opt;
   break;
@@ -7340,7 +7338,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
   break;
  }
 
-      if ((tls_mask & TLS_TPRELGD) != 0)
+      if ((tls_mask & TLS_GDIE) != 0)
  {
   /* IE */
   r_type = R_PPC_NONE;
@@ -7798,7 +7796,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
       {
  unsigned int tls_m = ((tls_mask & TLS_TLS) != 0
       ? tls_mask & (TLS_LD | TLS_GD | TLS_DTPREL
-    | TLS_TPREL | TLS_TPRELGD)
+    | TLS_TPREL | TLS_GDIE)
       : 0);
 
  if (offp == &htab->tlsld_got.offset)
@@ -7828,7 +7826,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
  tls_ty = TLS_TLS | TLS_DTPREL;
  tls_m &= ~TLS_DTPREL;
       }
-    else if ((tls_m & (TLS_TPREL | TLS_TPRELGD)) != 0)
+    else if ((tls_m & (TLS_TPREL | TLS_GDIE)) != 0)
       {
  tls_ty = TLS_TLS | TLS_TPREL;
  tls_m = 0;
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 9d3ba36c02..9c32c69205 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3039,9 +3039,7 @@ struct ppc_link_hash_entry
      of the other TLS bits are set.  tls_optimize clears bits when
      optimizing to indicate the corresponding GOT entry type is not
      needed.  If set, TLS_TLS is never cleared.  tls_optimize may also
-     set TLS_TPRELGD when a GD reloc turns into a TPREL one.  We use a
-     separate flag rather than setting TPREL just for convenience in
-     distinguishing the two cases.
+     set TLS_GDIE when a GD reloc turns into an IE one.
      These flags are also kept for local symbols.  */
 #define TLS_TLS 1 /* Any TLS reloc.  */
 #define TLS_GD 2 /* GD reloc. */
@@ -3049,7 +3047,7 @@ struct ppc_link_hash_entry
 #define TLS_TPREL 8 /* TPREL reloc, => IE. */
 #define TLS_DTPREL 16 /* DTPREL reloc, => LD. */
 #define TLS_MARK 32 /* __tls_get_addr call marked. */
-#define TLS_TPRELGD 64 /* TPREL reloc resulting from GD->IE. */
+#define TLS_GDIE 64 /* GOT TPREL reloc resulting from GD->IE. */
 #define TLS_EXPLICIT   128 /* Marks TOC section TLS relocs. */
   unsigned char tls_mask;
 
@@ -7797,7 +7795,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info)
  tls_set = 0;
       else
  /* GD -> IE */
- tls_set = TLS_TLS | TLS_TPRELGD;
+ tls_set = TLS_TLS | TLS_GDIE;
       tls_clear = TLS_GD;
       tls_type = TLS_TLS | TLS_GD;
       break;
@@ -7924,7 +7922,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info)
     tls_set = TLS_EXPLICIT | TLS_GD;
   else
     /* GD -> IE */
-    tls_set = TLS_EXPLICIT | TLS_GD | TLS_TPRELGD;
+    tls_set = TLS_EXPLICIT | TLS_GD | TLS_GDIE;
   tls_clear = TLS_GD;
  }
       else
@@ -9239,7 +9237,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
   eh = (struct ppc_link_hash_entry *) h;
   /* Run through the TLS GD got entries first if we're changing them
      to TPREL.  */
-  if ((eh->tls_mask & (TLS_TLS | TLS_TPRELGD)) == (TLS_TLS | TLS_TPRELGD))
+  if ((eh->tls_mask & (TLS_TLS | TLS_GDIE)) == (TLS_TLS | TLS_GDIE))
     for (gent = h->got.glist; gent != NULL; gent = gent->next)
       if (gent->got.refcount > 0
   && (gent->tls_type & TLS_GD) != 0)
@@ -14387,7 +14385,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
        doing a GD->IE transition.  */
     if (retval == 2)
       {
- tls_gd = TLS_TPRELGD;
+ tls_gd = TLS_GDIE;
  if ((tls_mask & TLS_TLS) != 0
     && (tls_mask & TLS_GD) == 0)
   goto tls_ldgd_opt;
@@ -14469,7 +14467,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
 
  case R_PPC64_GOT_TLSGD16_HI:
  case R_PPC64_GOT_TLSGD16_HA:
-  tls_gd = TLS_TPRELGD;
+  tls_gd = TLS_GDIE;
   if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_GD) == 0)
     goto tls_gdld_hi;
   break;
@@ -14494,7 +14492,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
 
  case R_PPC64_GOT_TLSGD16:
  case R_PPC64_GOT_TLSGD16_LO:
-  tls_gd = TLS_TPRELGD;
+  tls_gd = TLS_GDIE;
   if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_GD) == 0)
     goto tls_ldgd_opt;
   break;
@@ -14621,7 +14619,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
       if (ELF64_R_TYPE (rel[1].r_info) == R_PPC64_PLTCALL)
  bfd_put_32 (output_bfd, NOP, contents + offset + 4);
 
-      if ((tls_mask & TLS_TPRELGD) != 0)
+      if ((tls_mask & TLS_GDIE) != 0)
  {
   /* IE */
   r_type = R_PPC64_NONE;
@@ -14644,7 +14642,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
       BFD_ASSERT (offset == rel[1].r_offset);
       rel[1].r_info = ELF64_R_INFO (STN_UNDEF, R_PPC64_NONE);
       bfd_put_32 (input_bfd, insn2, contents + offset);
-      if ((tls_mask & TLS_TPRELGD) == 0 && toc_symndx != 0)
+      if ((tls_mask & TLS_GDIE) == 0 && toc_symndx != 0)
  goto again;
     }
   break;
@@ -14705,7 +14703,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
       if ((tls_mask & TLS_GD) == 0)
  {
   rel[1].r_info = ELF64_R_INFO (r_symndx, R_PPC64_NONE);
-  if ((tls_mask & TLS_TPRELGD) != 0)
+  if ((tls_mask & TLS_GDIE) != 0)
     r_type = R_PPC64_TPREL64;
   else
     {
Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-i686, branch master

gdb-buildbot
Buildername:
        Fedora-i686

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/18/builds/333

Author:
        Alan Modra <[hidden email]>

Commit tested:
        b00a0a86c40c681cf4b22a3630f85188ac849721

Subject of commit:
        [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-i686/b0/b00a0a86c40c681cf4b22a3630f85188ac849721/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-cc-with-index, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-cc-with-index

Worker:
        fedora-x86-64-1

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/20/builds/332

Author:
        Alan Modra <[hidden email]>

Commit tested:
        b00a0a86c40c681cf4b22a3630f85188ac849721

Subject of commit:
        [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/b0/b00a0a86c40c681cf4b22a3630f85188ac849721/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-m32

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/17/builds/330

Author:
        Alan Modra <[hidden email]>

Commit tested:
        b00a0a86c40c681cf4b22a3630f85188ac849721

Subject of commit:
        [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m64, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-m64

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/3/builds/355

Author:
        Alan Modra <[hidden email]>

Commit tested:
        b00a0a86c40c681cf4b22a3630f85188ac849721

Subject of commit:
        [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/b0/b00a0a86c40c681cf4b22a3630f85188ac849721/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m32

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/4/builds/330

Author:
        Alan Modra <[hidden email]>

Commit tested:
        b00a0a86c40c681cf4b22a3630f85188ac849721

Subject of commit:
        [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721/

*** Diff to previous build ***
==============================================
PASS -> UNRESOLVED: gdb.threads/attach-into-signal.exp: threaded: attach
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-gdbserver-m32

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/24/builds/330

Author:
        Alan Modra <[hidden email]>

Commit tested:
        b00a0a86c40c681cf4b22a3630f85188ac849721

Subject of commit:
        [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m64

Worker:
        fedora-x86-64-1

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/2/builds/332

Author:
        Alan Modra <[hidden email]>

Commit tested:
        b00a0a86c40c681cf4b22a3630f85188ac849721

Subject of commit:
        [PowerPC] Rename TLS_TPRELGD to TLS_GDIE

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/b0/b00a0a86c40c681cf4b22a3630f85188ac849721/

*** Diff to previous build ***
==============================================
PASS -> UNRESOLVED: gdb.threads/attach-into-signal.exp: threaded: attach
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/b0/b00a0a86c40c681cf4b22a3630f85188ac849721//xfail.table.gz>