[PATCH 07/15] s390: Sync formatting between {elf32|elf64}-s390.c

Jens Remus jremus@linux.ibm.com
Fri Nov 7 16:34:50 GMT 2025


Over time elf32-s390.c and elf64-s390.c have diverged in some areas.

Align formatting between each other.  This simplifies comparison of
elf32-s390.c and elf64-s390.c, as it reduces the number of unimportant
differences.

Non-functional change.

bfd/
	* elf32-s390.c (plt_entry): Indent union {...} plt.
	(elf_s390_link_hash_table): Indent union {...} tls_ldm_got.
	* elf64-s390.c (elf_s390_reloc_name_lookup): Don't wrap for loop
	expressions.
	(elf_s390_link_hash_table): Indent union {...} tls_ldm_got.
	(allocate_dynrelocs): Don't wrap argument list.
	(elf_s390_relocate_section): Wrap if conditions.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
 bfd/elf32-s390.c | 16 ++++++++--------
 bfd/elf64-s390.c | 24 +++++++++++++-----------
 2 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 6fdd6ce1dc08..d32cd339b7e6 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -685,10 +685,10 @@ struct plt_entry
   asection *sec;
 
   union
-  {
-    bfd_signed_vma refcount;
-    bfd_vma offset;
-  } plt;
+    {
+      bfd_signed_vma refcount;
+      bfd_vma offset;
+    } plt;
 };
 
 /* NOTE: Keep this structure in sync with
@@ -741,10 +741,10 @@ struct elf_s390_link_hash_table
   asection *irelifunc;
 
   union
-  {
-    bfd_signed_vma refcount;
-    bfd_vma offset;
-  } tls_ldm_got;
+    {
+      bfd_signed_vma refcount;
+      bfd_vma offset;
+    } tls_ldm_got;
 };
 
 /* Get the s390 ELF linker hash table from a link_info structure.  */
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index cf1f7b51cc75..bcc2e29bf9d5 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -340,9 +340,7 @@ elf_s390_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 {
   unsigned int i;
 
-  for (i = 0;
-       i < sizeof (elf_howto_table) / sizeof (elf_howto_table[0]);
-       i++)
+  for (i = 0; i < sizeof (elf_howto_table) / sizeof (elf_howto_table[0]); i++)
     if (elf_howto_table[i].name != NULL
 	&& strcasecmp (elf_howto_table[i].name, r_name) == 0)
       return &elf_howto_table[i];
@@ -741,10 +739,11 @@ struct elf_s390_link_hash_table
   /* The .sframe helper object for .plt section.  */
   const struct elf_s390x_sframe_plt *sframe_plt;
 
-  union {
-    bfd_signed_vma refcount;
-    bfd_vma offset;
-  } tls_ldm_got;
+  union
+    {
+      bfd_signed_vma refcount;
+      bfd_vma offset;
+    } tls_ldm_got;
 
   /* Options passed from the linker.  */
   struct s390_elf_params *params;
@@ -1702,8 +1701,7 @@ _bfd_s390_elf_write_sframe_plt (struct bfd_link_info *info)
    dynamic relocs.  */
 
 static bool
-allocate_dynrelocs (struct elf_link_hash_entry *h,
-		    void * inf)
+allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
 {
   struct bfd_link_info *info;
   struct elf_s390_link_hash_table *htab;
@@ -3075,7 +3073,9 @@ elf_s390_relocate_section (bfd *output_bfd,
 	  else if (h != NULL)
 	    {
 	      tls_type = elf_s390_hash_entry(h)->tls_type;
-	      if (!bfd_link_dll (info) && h->dynindx == -1 && tls_type >= GOT_TLS_IE)
+	      if (!bfd_link_dll (info)
+		  && h->dynindx == -1
+		  && tls_type >= GOT_TLS_IE)
 		r_type = R_390_TLS_LE64;
 	    }
 	  if (r_type == R_390_TLS_GD64 && tls_type >= GOT_TLS_IE)
@@ -3193,7 +3193,9 @@ elf_s390_relocate_section (bfd *output_bfd,
 	    {
 	      off = h->got.offset;
 	      tls_type = elf_s390_hash_entry(h)->tls_type;
-	      if (bfd_link_dll (info) || h->dynindx != -1 || tls_type < GOT_TLS_IE)
+	      if (bfd_link_dll (info)
+		  || h->dynindx != -1
+		  || tls_type < GOT_TLS_IE)
 		goto emit_tls_relocs;
 	    }
 
-- 
2.48.1



More information about the Binutils mailing list