[COMMITTED] bfd: sframe: minor code adjustments and fix typos

Message ID 20240517182658.3877603-1-indu.bhagat@oracle.com
State New
Headers
Series [COMMITTED] bfd: sframe: minor code adjustments and fix typos |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 warning Patch is already merged

Commit Message

Indu Bhagat May 17, 2024, 6:26 p.m. UTC
  [Committed as obvious.]

bfd/
	* elfxx-x86.c (_bfd_x86_elf_create_sframe_plt): Use local
	variable.
	(_bfd_x86_elf_size_dynamic_sections): Fix typos.
---
 bfd/elfxx-x86.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
  

Patch

diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 725884e78c1..8564391029a 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -1861,7 +1861,7 @@  _bfd_x86_elf_create_sframe_plt (bfd *output_bfd,
 	  plt_entry_size = htab->plt.plt_entry_size;
 	  num_pltn_fres = htab->sframe_plt->pltn_num_fres;
 	  num_pltn_entries
-	    = (htab->elf.splt->size - plt0_entry_size) / plt_entry_size;
+	    = (dpltsec->size - plt0_entry_size) / plt_entry_size;
 
 	  break;
 	}
@@ -1873,8 +1873,7 @@  _bfd_x86_elf_create_sframe_plt (bfd *output_bfd,
 
 	  plt_entry_size = htab->sframe_plt->sec_pltn_entry_size;
 	  num_pltn_fres = htab->sframe_plt->sec_pltn_num_fres;
-	  num_pltn_entries
-		= htab->plt_second_eh_frame->size / plt_entry_size;
+	  num_pltn_entries = dpltsec->size / plt_entry_size;
 	  break;
 	}
     default:
@@ -2507,16 +2506,15 @@  _bfd_x86_elf_late_size_sections (bfd *output_bfd,
 	  htab->plt_sframe->size = sizeof (sframe_header) + 1;
 	}
 
-      /* FIXME - generate for .got.plt ?  */
+      /* FIXME - generate for .plt.got ?  */
 
-      /* Unwind info for the second PLT.  */
       if (htab->plt_second_sframe != NULL
 	  && htab->plt_second != NULL
 	  && htab->plt_second->size != 0
 	  && !bfd_is_abs_section (htab->plt_second->output_section))
 	{
-	  _bfd_x86_elf_create_sframe_plt (output_bfd, info,
-					  SFRAME_PLT_SEC);
+	  /* SFrame stack trace info for the second PLT.  */
+	  _bfd_x86_elf_create_sframe_plt (output_bfd, info, SFRAME_PLT_SEC);
 	  /* FIXME - Dirty Hack.  Set the size to something non-zero for now,
 	     so that the section does not get stripped out below.  The precise
 	     size of this section is known only when the contents are