public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: Indu Bhagat <indu.bhagat@oracle.com>
Subject: [PATCH 02/12] gas: generate SFrame section with version SFRAME_VERSION_2
Date: Tue, 27 Jun 2023 14:20:18 -0700	[thread overview]
Message-ID: <20230627212028.2138604-3-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20230627212028.2138604-1-indu.bhagat@oracle.com>

gas/
	* gen-sframe.c (sframe_set_version): Update to SFRAME_VERSION_2.
	(output_sframe): Likewise.

gas/testsuite/
	* gas/cfi-sframe/cfi-sframe-aarch64-1.d: Use SFRAME_VERSION_2.
	* gas/cfi-sframe/cfi-sframe-aarch64-2.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-aarch64-pac-ab-key-1.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-common-1.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-common-2.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-common-3.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-common-4.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-common-5.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-common-6.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-common-7.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-common-8.d: Likewise.
	* gas/cfi-sframe/cfi-sframe-x86_64-1.d: Likewise.
	* gas/cfi-sframe/common-empty-1.d: Likewise.
	* gas/cfi-sframe/common-empty-2.d: Likewise.
	* gas/cfi-sframe/common-empty-3.d: Likewise.
---
 gas/gen-sframe.c                                         | 9 +++++++--
 gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d      | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d      | 2 +-
 .../gas/cfi-sframe/cfi-sframe-aarch64-pac-ab-key-1.d     | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d       | 2 +-
 gas/testsuite/gas/cfi-sframe/common-empty-1.d            | 2 +-
 gas/testsuite/gas/cfi-sframe/common-empty-2.d            | 2 +-
 gas/testsuite/gas/cfi-sframe/common-empty-3.d            | 2 +-
 16 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index b0bf514be75..7fca83bd610 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -278,7 +278,10 @@ sframe_v1_set_func_info (unsigned int fde_type, unsigned int fre_type,
 static void
 sframe_set_version (uint32_t sframe_version ATTRIBUTE_UNUSED)
 {
-  sframe_ver_ops.format_version = SFRAME_VERSION_1;
+  sframe_ver_ops.format_version = SFRAME_VERSION_2;
+
+  /* These operations remain the same for SFRAME_VERSION_2 as fre_info and
+     func_info have not changed from SFRAME_VERSION_1.  */
 
   sframe_ver_ops.set_fre_info = sframe_v1_set_fre_info;
 
@@ -605,6 +608,8 @@ output_sframe_funcdesc (symbolS *start_of_fre_section,
 #else
   out_one (func_info);
 #endif
+  out_one (0);
+  out_two (0);
 }
 
 static void
@@ -1355,7 +1360,7 @@ output_sframe (segT sframe_seg)
   (void) sframe_seg;
 
   /* Setup the version specific access functions.  */
-  sframe_set_version (SFRAME_VERSION_1);
+  sframe_set_version (SFRAME_VERSION_2);
 
   /* Process all fdes and create SFrame stack trace information.  */
   create_sframe_all ();
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d
index aeefbc9cdef..8ae46217117 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d
@@ -5,7 +5,7 @@
 Contents of the SFrame section .sframe:
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 3
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d
index 985f51fcda9..b7834d53b07 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 2
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-pac-ab-key-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-pac-ab-key-1.d
index 666a94101ab..599d4c4e795 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-pac-ab-key-1.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-pac-ab-key-1.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 2
     Num FREs: 6
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d
index 7d97383bb90..32577f31860 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 1
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d
index fc7d5c440db..3e3f74dbe42 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 1
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d
index 95954508e3d..6430d463a89 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 1
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d
index b835980ecbd..319ff96cce2 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 3
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d
index d2bef7507c2..82d34973ddd 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 3
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d
index f915ac5f234..fe6917c7080 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 3
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d
index cab19d5bc25..39724d9cdf1 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 3
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d
index c0a4a8de250..c0a0e627fad 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 2
diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d
index bba3b5920f1..ae36c21b3b7 100644
--- a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d
+++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 1
     Num FREs: 4
diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-1.d b/gas/testsuite/gas/cfi-sframe/common-empty-1.d
index 0b09799826c..141922517f0 100644
--- a/gas/testsuite/gas/cfi-sframe/common-empty-1.d
+++ b/gas/testsuite/gas/cfi-sframe/common-empty-1.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 0
     Num FREs: 0
diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-2.d b/gas/testsuite/gas/cfi-sframe/common-empty-2.d
index e566c078249..ab8de0b8afa 100644
--- a/gas/testsuite/gas/cfi-sframe/common-empty-2.d
+++ b/gas/testsuite/gas/cfi-sframe/common-empty-2.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 0
     Num FREs: 0
diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-3.d b/gas/testsuite/gas/cfi-sframe/common-empty-3.d
index f7a6062d392..df0b19ee1bd 100644
--- a/gas/testsuite/gas/cfi-sframe/common-empty-3.d
+++ b/gas/testsuite/gas/cfi-sframe/common-empty-3.d
@@ -6,7 +6,7 @@ Contents of the SFrame section .sframe:
 
   Header :
 
-    Version: SFRAME_VERSION_1
+    Version: SFRAME_VERSION_2
     Flags: NONE
     Num FDEs: 0
     Num FREs: 0
-- 
2.39.2


  parent reply	other threads:[~2023-06-27 21:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 21:20 [PATCH 00/12] SFrame Version 2 - definition and support Indu Bhagat
2023-06-27 21:20 ` [PATCH 01/12] sframe.h: format bump to SFrame version 2 Indu Bhagat
2023-06-27 21:20 ` Indu Bhagat [this message]
2023-06-27 21:20 ` [PATCH 03/12] libsframe: add new APIs to get SFrame version Indu Bhagat
2023-06-27 21:20 ` [PATCH 04/12] libsframe: add new APIs to add and get SFrame FDE in SFrame version 2 Indu Bhagat
2023-06-27 21:20 ` [PATCH 05/12] libsframe: adjust version check in sframe_header_sanity_check_p Indu Bhagat
2023-06-27 21:20 ` [PATCH 06/12] libsframe: testsuite: fixes for SFRAME_VERSION_2 Indu Bhagat
2023-06-27 21:20 ` [PATCH 07/12] bfd: linker: add support for rep_block_size for pltN entries Indu Bhagat
2023-06-27 21:20 ` [PATCH 08/12] bfd: linker: generate SFrame sections with version SFRAME_VERSION_2 Indu Bhagat
2023-06-27 21:20 ` [PATCH 09/12] objdump/readelf: adjust for SFRAME_VERSION_2 Indu Bhagat
2023-06-28 23:04   ` Hans-Peter Nilsson
2023-06-29  6:41     ` Indu Bhagat
2023-06-27 21:20 ` [PATCH 10/12] doc: sframe: update specification " Indu Bhagat
2023-06-27 21:20 ` [PATCH 11/12] doc: sframe: add details about alignment in the SFrame format Indu Bhagat
2023-06-27 21:20 ` [PATCH 12/12] binutils/NEWS: announce SFrame version 2 as the new default Indu Bhagat

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=20230627212028.2138604-3-indu.bhagat@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=binutils@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).