public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Michael Matz <matz@suse.de>
Cc: Jan Beulich <jbeulich@suse.com>, Alan Modra <amodra@gmail.com>,
	Brett Werling <bwerl.dev@gmail.com>,
	binutils@sourceware.org
Subject: Re: [PATCH] readelf: use fseeko for elf files >= 2 GiB on x86_64-mingw32
Date: Wed, 16 Nov 2022 22:40:22 +0700	[thread overview]
Message-ID: <Y3UEZtfoFjxbXszI@vapier> (raw)
In-Reply-To: <alpine.LSU.2.20.2211161430590.5466@wotan.suse.de>

[-- Attachment #1: Type: text/plain, Size: 2925 bytes --]

On 16 Nov 2022 14:44, Michael Matz wrote:
> On Wed, 16 Nov 2022, Mike Frysinger via Binutils wrote:
> > > >>> I think you are correct, this will need some conditional logic to be "safe"
> > > >>> to
> > > >>> include, and even then the casting to off_t would become a little more
> > > >>> complicated. I will look deeper into what can be done here.
> > > >>
> > > >> See bfd/bfdio.c and bfd/configure.ac
> > > > 
> > > > should we look at bfd using gnulib ?
> 
> The patch is for readelf, which doesn't use libbfd.

i'm aware.  my original message called this difference out.  using gnulib
in libbfd seems dicey when statically linking is common, and gnulib does
not provide symbol isolation, which means we'd see a lot of bleeding.

> (And if readelf 
> should use gnulib for this?  I don't know, seems overkill for a single 
> function).
> 
> > > > growing our own portability layer sounds
> > > > like a lot of dupicative effort ...
> 
> I think "growing" and "lot of" don't describe the effort.  Rewriting to 
> use gnulib (and the corresponding necessary testing) might be trivial as 
> well (though I don't think so), but the returns are still very small.

i disagree with your assessment.  the patch proposed isn't exactly trivial,
nor is it widely tested like gnulib.

further, if you read the existing binutils/configure.ac, there's a lot of
"copied from gnulib" logic in there that would get cleaned up.  there's
also logic for old systems that i doubt aren't actively tested (e.g. who
is actually building on Next 3.2?).

even further, readelf isn't the only file under binutils/ that uses fseek,
but it seems to be the only program you're trying to fix.  so the others
are still broken, which wouldn't be the case if gnulib was used.

even even further, gnulib is already in the tree.  it isn't like you have
to import & integrate its build logic or manage its autotool logic or its
header paths.  there are 3 top-level projects using it now, one of which
i converted, and it was pretty trivial.

> > realistically, is anyone actually testing those old distros ?
> 
> Depends on the definition of old.  For instance our oldish enterprise 
> stuff (SLES12) still has current binutils, so at least there it's tested 
> relatively good.  OTOH it's only 9 years old, so some might say that 
> doesn't qualify :)

assuming it shipped with a glibc version that supported POSIX 1003.1 (2013
edition), no, i don't consider that to be that old.  it's got all the fun
*at APIs and such.  i don't recall what the 2016 edition introduced, and i
don't think there are easy summaries to find, but i doubt much of it would
be relevant for binutils/.

are you claiming that current gnulib versions can't support even those old
versions of glibc ?  i'd find that extremely surprising, and really sounds
like a bug that should be taken up with the gnulib folks.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-11-16 15:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 15:03 Brett Werling
2022-11-14 15:30 ` Jan Beulich
2022-11-14 15:52   ` Brett Werling
2022-11-14 21:42     ` Alan Modra
2022-11-16 10:09       ` Mike Frysinger
2022-11-16 10:46         ` Jan Beulich
2022-11-16 14:01           ` Mike Frysinger
2022-11-16 14:44             ` Michael Matz
2022-11-16 15:40               ` Mike Frysinger [this message]
2022-11-16 15:58                 ` Jose E. Marchesi
2022-11-16 16:13                 ` Michael Matz
2022-11-16 17:09                   ` Mike Frysinger
2022-11-16 21:19                     ` Brett Werling
2022-11-17  8:02                       ` Mike Frysinger
2022-11-17 13:21                     ` Michael Matz
2022-11-15 14:57 ` [PATCH] readelf: use fseeko64 or fseeko if possible Brett Werling
2022-11-17  7:02   ` Alan Modra
2022-11-17 14:09     ` Brett Werling
2022-11-17 14:34 ` Brett Werling
2022-11-21 21:52   ` Alan Modra
2022-11-22 13:46     ` Michael Matz
2022-11-22 21:55       ` Alan Modra
2022-11-22 21:57   ` Alan Modra
2022-11-22 21:59     ` Don't use "long" in readelf for file offsets Alan Modra

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=Y3UEZtfoFjxbXszI@vapier \
    --to=vapier@gentoo.org \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=bwerl.dev@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=matz@suse.de \
    /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).