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 08/10] libsframe: use uint8_t instead of unsigned char for abi_arch
Date: Thu, 22 Jun 2023 21:44:46 -0700	[thread overview]
Message-ID: <20230623044448.2617101-9-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20230623044448.2617101-1-indu.bhagat@oracle.com>

Use uint8_t consistently for identifying ABI/arch in SFrame format.

bfd/
	* elf-sframe.c (_bfd_elf_merge_section_sframe):
libsframe/
	* sframe-dump.c (is_sframe_abi_arch_aarch64): Use uint8_t for
	local variable.
	* sframe.c (sframe_decoder_get_abi_arch): Update return type to
	uint8_t.
	(sframe_encoder_get_abi_arch): Likewise.
include/
	* sframe-api.h (sframe_decoder_get_abi_arch): Likewise.
	(sframe_encoder_get_abi_arch): Likewise.
---
 bfd/elf-sframe.c        | 2 +-
 include/sframe-api.h    | 4 ++--
 libsframe/sframe-dump.c | 6 +++---
 libsframe/sframe.c      | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c
index 57d67989bf9..069f7564fb4 100644
--- a/bfd/elf-sframe.c
+++ b/bfd/elf-sframe.c
@@ -325,7 +325,7 @@ _bfd_elf_merge_section_sframe (bfd *abfd,
   struct sframe_enc_info *sfe_info;
   sframe_decoder_ctx *sfd_ctx;
   sframe_encoder_ctx *sfe_ctx;
-  unsigned char sfd_ctx_abi_arch;
+  uint8_t sfd_ctx_abi_arch;
   int8_t sfd_ctx_fixed_fp_offset;
   int8_t sfd_ctx_fixed_ra_offset;
   int encerr = 0;
diff --git a/include/sframe-api.h b/include/sframe-api.h
index 70829ec87cb..e62a7a38285 100644
--- a/include/sframe-api.h
+++ b/include/sframe-api.h
@@ -117,7 +117,7 @@ extern unsigned int
 sframe_decoder_get_hdr_size (sframe_decoder_ctx *dctx);
 
 /* Get the SFrame's abi/arch info.  */
-extern unsigned char
+extern uint8_t
 sframe_decoder_get_abi_arch (sframe_decoder_ctx *dctx);
 
 /* Return the number of function descriptor entries in the SFrame decoder
@@ -214,7 +214,7 @@ extern unsigned int
 sframe_encoder_get_hdr_size (sframe_encoder_ctx *encoder);
 
 /* Get the abi/arch info from the SFrame encoder context CTX.  */
-extern unsigned char
+extern uint8_t
 sframe_encoder_get_abi_arch (sframe_encoder_ctx *encoder);
 
 /* Return the number of function descriptor entries in the SFrame encoder
diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c
index 2491b4391f3..37ce9d70eb3 100644
--- a/libsframe/sframe-dump.c
+++ b/libsframe/sframe-dump.c
@@ -32,9 +32,9 @@ is_sframe_abi_arch_aarch64 (sframe_decoder_ctx *sfd_ctx)
 {
   bool aarch64_p = false;
 
-  unsigned char abi_arch = sframe_decoder_get_abi_arch (sfd_ctx);
-  if ((abi_arch == SFRAME_ABI_AARCH64_ENDIAN_BIG)
-      || (abi_arch == SFRAME_ABI_AARCH64_ENDIAN_LITTLE))
+  uint8_t abi_arch = sframe_decoder_get_abi_arch (sfd_ctx);
+  if (abi_arch == SFRAME_ABI_AARCH64_ENDIAN_BIG
+      || abi_arch == SFRAME_ABI_AARCH64_ENDIAN_LITTLE)
     aarch64_p = true;
 
   return aarch64_p;
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index 8e9dc0a9d2c..7bb8c647c19 100644
--- a/libsframe/sframe.c
+++ b/libsframe/sframe.c
@@ -933,7 +933,7 @@ sframe_decoder_get_hdr_size (sframe_decoder_ctx *ctx)
 
 /* Get the SFrame's abi/arch info given the decoder context CTX.  */
 
-unsigned char
+uint8_t
 sframe_decoder_get_abi_arch (sframe_decoder_ctx *ctx)
 {
   sframe_header *sframe_header;
@@ -1322,10 +1322,10 @@ sframe_encoder_get_hdr_size (sframe_encoder_ctx *encoder)
 
 /* Get the abi/arch info from the SFrame encoder context ENCODER.  */
 
-unsigned char
+uint8_t
 sframe_encoder_get_abi_arch (sframe_encoder_ctx *encoder)
 {
-  unsigned char abi_arch = 0;
+  uint8_t abi_arch = 0;
   sframe_header *ehp;
   ehp = sframe_encoder_get_header (encoder);
   if (ehp)
-- 
2.39.2


  parent reply	other threads:[~2023-06-23  4:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23  4:44 [PATCH 00/10] Patches for libsframe versioning and symbol versioning Indu Bhagat
2023-06-23  4:44 ` [PATCH 01/10] libsframe: add library versioning Indu Bhagat
2023-06-23  4:44 ` [PATCH 02/10] libsframe: remove sframe_get_funcdesc_with_addr API Indu Bhagat
2023-06-23  4:44 ` [PATCH 03/10] libsframe: add symbol versioning Indu Bhagat
2023-06-23  4:44 ` [PATCH 04/10] libsframe: update the semantics of sframe_fre_get_ra_offset Indu Bhagat
2023-06-23  4:44 ` [PATCH 05/10] libsframe: update the semantics of sframe_fre_get_fp_offset Indu Bhagat
2023-06-23  4:44 ` [PATCH 06/10] libsframe: use uint32_t for fre_type and fde_type function args Indu Bhagat
2023-06-23  4:44 ` [PATCH 07/10] bfd: libsframe: use uint32_t for return type of sframe_calc_fre_type Indu Bhagat
2023-06-23  4:44 ` Indu Bhagat [this message]
2023-06-23  4:44 ` [PATCH 09/10] libsframe: use uint8_t for return type of sframe_fre_get_base_reg_id Indu Bhagat
2023-06-23  4:44 ` [PATCH 10/10] binutils/NEWS: add note about upcoming libsframe changes Indu Bhagat
2023-06-27 19:59 ` [PATCH 00/10] Patches for libsframe versioning and symbol versioning 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=20230623044448.2617101-9-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).