public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Cc: Nick Clifton <nickc@redhat.com>, Alan Modra <amodra@gmail.com>
Subject: how to know host endianness in binutils
Date: Thu, 21 Dec 2023 15:30:50 +0100	[thread overview]
Message-ID: <d4fe56ce-d6b8-4003-a2ff-f899562440fa@suse.com> (raw)

Hello,

looking around, I can't seem to be able to find any standardized way of
knowing host endianness in binutils (in gas/ in particular). As was
pointed out to me, the new cpu_flags_from_attr() in config/tc-i386.c
won't work as is on big-endian hosts, yet I would really, really like
to avoid needing to enumerate all of the dozens of bitfields in that
function (converting one kind of bitfield to another). That's not the
least because this set constantly grows.

I can see config/tc-bpf.c checking WORDS_BIGENDIAN, but I couldn't
convince myself (from looking at the generated config.h) that one can
really rely on that.

Jan

             reply	other threads:[~2023-12-21 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 14:30 Jan Beulich [this message]
2023-12-21 15:11 ` H.J. Lu
2024-01-02 11:29 ` Nick Clifton
2024-01-09 16:19 ` Michael Matz

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=d4fe56ce-d6b8-4003-a2ff-f899562440fa@suse.com \
    --to=jbeulich@suse.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /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).