[PATCH 01/10] s390: Sync whitespace formatting between {elf32|elf64}-s390.c
Jens Remus
jremus@linux.ibm.com
Thu Nov 13 13:21:52 GMT 2025
Over time elf32-s390.c and elf64-s390.c have diverged in some areas.
Align whitespace formatting between both source files. This simplifies
comparison of elf32-s390.c and elf64-s390.c, as it reduces the number of
unimportant differences.
Non-functional change. Only adding/removing empty lines.
bfd/
* elf32-s390.c: Sync whitespace formatting with ...
* elf64-s390.c: ... this.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
bfd/elf32-s390.c | 11 ++++++++---
bfd/elf64-s390.c | 12 +++++++-----
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 252ec44f4095..6fdd6ce1dc08 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -992,6 +992,7 @@ elf_s390_check_relocs (bfd *abfd,
local_got_refcounts = elf_local_got_refcounts (abfd);
}
/* Fall through. */
+
case R_390_GOTOFF16:
case R_390_GOTOFF32:
case R_390_GOTPC:
@@ -1023,6 +1024,7 @@ elf_s390_check_relocs (bfd *abfd,
h->needs_plt = 1;
}
}
+
switch (r_type)
{
case R_390_GOTPC:
@@ -1356,6 +1358,7 @@ elf_s390_gc_mark_hook (asection *sec,
case R_390_GNU_VTENTRY:
return NULL;
}
+
return _bfd_elf_gc_mark_hook (sec, info, cookie, h, symndx);
}
@@ -1865,6 +1868,7 @@ elf_s390_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else
*local_got = (bfd_vma) -1;
}
+
local_plt = elf_s390_local_plt (ibfd);
for (i = 0; i < symtab_hdr->sh_info; i++)
{
@@ -2081,6 +2085,7 @@ elf_s390_relocate_section (bfd *output_bfd,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
+
if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
{
struct plt_entry *local_plt = elf_s390_local_plt (input_bfd);
@@ -2573,7 +2578,6 @@ elf_s390_relocate_section (bfd *output_bfd,
/* When generating a shared object, these relocations
are copied into the output file to be resolved at run
time. */
-
skip = false;
relocate = false;
@@ -3325,6 +3329,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd,
eh->ifunc_resolver_address +
eh->ifunc_resolver_section->output_offset +
eh->ifunc_resolver_section->output_section->vma);
+
/* Do not return yet. Handling of explicit GOT slots of
IFUNC symbols is below. */
}
@@ -3463,7 +3468,6 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd,
/* This symbol has an entry in the global offset table. Set it
up. */
-
if (htab->elf.sgot == NULL || htab->elf.srelgot == NULL)
abort ();
@@ -3705,6 +3709,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
elf_section_data (htab->elf.sgotplt->output_section)
->this_hdr.sh_entsize = 4;
}
+
/* Finish dynamic symbol for local IFUNC symbols. */
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
{
@@ -3738,6 +3743,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
}
}
}
+
return true;
}
@@ -3918,7 +3924,6 @@ elf32_s390_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
#define bfd_elf32_bfd_link_hash_table_create elf_s390_link_hash_table_create
#define bfd_elf32_bfd_reloc_type_lookup elf_s390_reloc_type_lookup
#define bfd_elf32_bfd_reloc_name_lookup elf_s390_reloc_name_lookup
-
#define bfd_elf32_bfd_merge_private_bfd_data elf32_s390_merge_private_bfd_data
#define elf_backend_adjust_dynamic_symbol elf_s390_adjust_dynamic_symbol
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 6394f27e0e2e..cf1f7b51cc75 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -43,6 +43,7 @@ s390_elf_ldisp_reloc (bfd *, arelent *, asymbol *, void *,
asection *, bfd *, char **);
/* The relocation "howto" table. */
+
static reloc_howto_type elf_howto_table[] =
{
HOWTO (R_390_NONE, /* type */
@@ -385,6 +386,7 @@ elf_s390_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
}
cache_ptr->howto = &elf_howto_table[r_type];
}
+
return true;
}
@@ -425,6 +427,7 @@ s390_elf_ldisp_reloc (bfd *abfd,
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
+
if (output_bfd != NULL)
return bfd_reloc_continue;
@@ -996,8 +999,8 @@ elf_s390_check_relocs (bfd *abfd,
return false;
local_got_refcounts = elf_local_got_refcounts (abfd);
}
-
/* Fall through. */
+
case R_390_GOTOFF16:
case R_390_GOTOFF32:
case R_390_GOTOFF64:
@@ -1310,6 +1313,7 @@ elf_s390_check_relocs (bfd *abfd,
if (p == NULL || p->sec != sec)
{
size_t amt = sizeof *p;
+
p = ((struct elf_dyn_relocs *)
bfd_alloc (htab->elf.dynobj, amt));
if (p == NULL)
@@ -1915,6 +1919,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h,
for (p = h->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
+
sreloc->size += p->count * sizeof (Elf64_External_Rela);
}
@@ -2712,6 +2717,7 @@ elf_s390_relocate_section (bfd *output_bfd,
break;
}
+
if (s390_is_ifunc_symbol_p (h))
relocation = (htab->elf.iplt->output_section->vma
+ htab->elf.iplt->output_offset
@@ -2958,7 +2964,6 @@ elf_s390_relocate_section (bfd *output_bfd,
skip = true;
else if (outrel.r_offset == (bfd_vma) -2)
skip = true, relocate = true;
-
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -3005,7 +3010,6 @@ elf_s390_relocate_section (bfd *output_bfd,
osec = sec->output_section;
sindx = elf_section_data (osec)->dynindx;
-
if (sindx == 0)
{
osec = htab->elf.text_index_section;
@@ -3039,7 +3043,6 @@ elf_s390_relocate_section (bfd *output_bfd,
if (! relocate)
continue;
}
-
break;
/* Relocations for tls literal pool entries. */
@@ -3581,7 +3584,6 @@ elf_s390_finish_ifunc_symbol (bfd *output_bfd,
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
}
-
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
--
2.48.1
More information about the Binutils
mailing list