public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* lang_size_relro_segment tidy
@ 2022-01-18  0:55 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-01-18  0:55 UTC (permalink / raw)
  To: binutils

This function has seen too many minimal change style edits.
No functional changes in this patch.

	* ldlang.c (lang_size_relro_segment): Tidy.

diff --git a/ld/ldlang.c b/ld/ldlang.c
index 499a9c7182c..93fcfc4cbc7 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -6465,36 +6465,24 @@ static bool
 lang_size_relro_segment (bool *relax, bool check_regions)
 {
   bool do_reset = false;
-  bool do_data_relro;
-  bfd_vma data_initial_base, data_relro_end;
 
   if (link_info.relro && expld.dataseg.relro_end)
     {
-      do_data_relro = true;
-      data_initial_base = expld.dataseg.base;
-      data_relro_end = lang_size_relro_segment_1 (&expld.dataseg);
-    }
-  else
-    {
-      do_data_relro = false;
-      data_initial_base = data_relro_end = 0;
-    }
+      bfd_vma data_initial_base = expld.dataseg.base;
+      bfd_vma data_relro_end = lang_size_relro_segment_1 (&expld.dataseg);
 
-  if (do_data_relro)
-    {
       lang_reset_memory_regions ();
       one_lang_size_sections_pass (relax, check_regions);
 
       /* Assignments to dot, or to output section address in a user
 	 script have increased padding over the original.  Revert.  */
-      if (do_data_relro && expld.dataseg.relro_end > data_relro_end)
+      if (expld.dataseg.relro_end > data_relro_end)
 	{
 	  expld.dataseg.base = data_initial_base;;
 	  do_reset = true;
 	}
     }
-
-  if (!do_data_relro && lang_size_segment (&expld.dataseg))
+  else if (lang_size_segment (&expld.dataseg))
     do_reset = true;
 
   return do_reset;

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-18  0:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18  0:55 lang_size_relro_segment tidy Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).