public inbox for openrisc@lists.librecores.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [PATCH 7/8] or1k: refactor: Rename s to sgot and splt
Date: Fri, 15 May 2020 06:00:17 +0900	[thread overview]
Message-ID: <20200514210018.2749462-8-shorne@gmail.com> (raw)
In-Reply-To: <20200514210018.2749462-1-shorne@gmail.com>

The symbol name s for section is terse, replacing with sgot when it
refers to the got and splt when it refers to the plt makes reading code
a bit easier.

bfd/ChangeLog:

yyyy-mm-dd  Stafford Horne  <shorne@gmail.com>

	* elf32-or1k.c (allocate_dynrelocs): Rename s to splt or sgot
	based on usage.
---
 bfd/elf32-or1k.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index 22c316d042..7ac34737aa 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -2780,14 +2780,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
 
       if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
 	{
-	  asection *s = htab->root.splt;
+	  asection *splt = htab->root.splt;
 
 	  /* If this is the first .plt entry, make room for the special
 	     first entry.  */
-	  if (s->size == 0)
-	    s->size = PLT_ENTRY_SIZE;
+	  if (splt->size == 0)
+	    splt->size = PLT_ENTRY_SIZE;
 
-	  h->plt.offset = s->size;
+	  h->plt.offset = splt->size;
 
 	  /* If this symbol is not defined in a regular file, and we are
 	     not generating a shared library, then set the symbol to this
@@ -2797,12 +2797,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
 	  if (! bfd_link_pic (info)
 	      && !h->def_regular)
 	    {
-	      h->root.u.def.section = s;
+	      h->root.u.def.section = splt;
 	      h->root.u.def.value = h->plt.offset;
 	    }
 
 	  /* Make room for this entry.  */
-	  s->size += PLT_ENTRY_SIZE;
+	  splt->size += PLT_ENTRY_SIZE;
 
 	  /* We also need to make an entry in the .got.plt section, which
 	     will be placed in the .got section by the linker script.  */
@@ -2825,7 +2825,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
 
   if (h->got.refcount > 0)
     {
-      asection *s;
+      asection *sgot;
       bfd_boolean dyn;
       unsigned char tls_type;
 
@@ -2838,16 +2838,16 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
 	    return FALSE;
 	}
 
-      s = htab->root.sgot;
+      sgot = htab->root.sgot;
 
-      h->got.offset = s->size;
+      h->got.offset = sgot->size;
 
       tls_type = ((struct elf_or1k_link_hash_entry *) h)->tls_type;
 
       dyn = htab->root.dynamic_sections_created;
       dyn = WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h);
       or1k_set_got_and_rela_sizes (tls_type, dyn,
-				   &s->size, &htab->root.srelgot->size);
+				   &sgot->size, &htab->root.srelgot->size);
     }
   else
     h->got.offset = (bfd_vma) -1;
-- 
2.26.2


  parent reply	other threads:[~2020-05-14 21:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 21:00 [OpenRISC] [PATCH 0/8] OpenRISC BFD fixups for Glibc Stafford Horne
2020-05-14 21:00 ` [OpenRISC] [PATCH 1/8] or1k: Fix static linking when with .rela.got relocations Stafford Horne
2020-05-14 21:00 ` [OpenRISC] [PATCH 2/8] or1k: Fix dynamic TLS symbol flag Stafford Horne
2020-05-14 21:00 ` [OpenRISC] [PATCH 3/8] or1k: Add TLS mask to handle multiple model access Stafford Horne
2020-05-14 21:00 ` [OpenRISC] [PATCH 4/8] or1k: Fix issue with multiple PCREL relocations Stafford Horne
2020-05-14 21:00 ` [OpenRISC] [PATCH 5/8] or1k: TLS offset to use tcb size and section alignment Stafford Horne
2020-05-14 21:00 ` [OpenRISC] [PATCH 6/8] or1k: refactor: Rename p to sec_relocs Stafford Horne
2020-05-14 21:00 ` Stafford Horne [this message]
2020-05-14 21:00 ` [OpenRISC] [PATCH 8/8] or1k: Add dynamic flag to tpoff Stafford Horne
2020-05-19 13:30 ` [OpenRISC] [PATCH 0/8] OpenRISC BFD fixups for Glibc Nick Clifton
2020-05-19 20:42   ` Stafford Horne
2020-05-20 10:41     ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200514210018.2749462-8-shorne@gmail.com \
    --to=shorne@gmail.com \
    --cc=openrisc@lists.librecores.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox