From: Mark Wielaard <mark@klomp.org>
To: Dodji Seketeli <dodji@seketeli.org>
Cc: libabigail@sourceware.org
Subject: Re: How to drop all non-global/defined function declarations?
Date: Mon, 13 Apr 2020 03:39:01 +0200 [thread overview]
Message-ID: <20200413013901.GA3584@wildebeest.org> (raw)
In-Reply-To: <86blnzohf5.fsf@seketeli.org>
Hi Dodji,
On Fri, Apr 10, 2020 at 10:48:14AM +0200, Dodji Seketeli wrote:
> Mark Wielaard <mark@klomp.org> a écrit:
> > Why are free and malloc included? They are explicitly marked as
> > undefined in the symbol table and the xml abi definition doesn't
> > include an elf-function-symbol for them?
>
> They are included because we capture all global function and variable
> symbols, including those that are undefined. That can be useful down
> the road for tools like abicompat:
> https://sourceware.org/libabigail/manual/abicompat.html. It's true that
> they are not defined by the librarie so if you know that you need those,
> so yeah, maybe we should add an option to get rid of them. Right now,
> you can't.
I have a patch to get rid of them for the dwarf reader and abidw.
Which can be extended to the xml reader and other tools if userful.
> > I think them being undefined in the symbol table make them unexported.
> > They are just there to show the library consumes that symbol.
>
> You are right.
>
> > That is also an abi issue, but not one I am interested in.
>
> Well, that's the gotcha I think :-)
>
> In your particular use case, you are not interested. But others might
> use that information, to for instance, build the transitive closure of
> dependencies (in terms of either symbols or libraries) of the binary
> which ABI is being modelled by the current abixml file. That's
> precisely why we are adding this information in. As I said above, the
> abicompat tool need that information, for instance. Users of the
> library might need it too.
You are right too. I hadn't considered abicompat. It is certainly
useful (and necessary) in the case.
> > The main issue is that they are really noise. They don't come with an
> > argument list or a real return type.
>
> If you think having that information in is a real problem for you, we
> can find a way to let you remove it. But I am not yet convinced that
> it's better to remove it by default because it might be useful for other
> use cases, and as it stands right now, the size of undefined entry
> points in the abixml file is quite small.
>
> > And they make the xml abi file harder to compare (visually).
>
> Hmmh. I think I see your point here. But Historically, the abixml file
> wasn't meant to be compared textually. The tool to compare abixml files
> is abidiff and it knows how to deal with that.
>
> > My goal here is to have an xml abi file checked into git. Then when we
> > update the abi, it should be accompanied by a change in the xml abi
> > file. The smaller and more concise we can make the xml abi file the
> > clearer it is what we are exactly changing that impacts the abi.
>
> I get that. We try to make this possible as much as we can. We also
> have other constraints to satisfy. We try to make all these ends meet.
I'll sent a patch for abidw --drop-undefined-syms which should help my case.
Cheers,
Mark
next prev parent reply other threads:[~2020-04-13 1:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 20:08 Mark Wielaard
2020-04-07 9:38 ` Dodji Seketeli
2020-04-08 15:02 ` Mark Wielaard
2020-04-10 8:48 ` Dodji Seketeli
2020-04-13 1:39 ` Mark Wielaard [this message]
2020-04-13 1:40 ` [PATCH] Add --drop-undefined-syms to abidw Mark Wielaard
2020-04-15 12:48 ` Dodji Seketeli
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=20200413013901.GA3584@wildebeest.org \
--to=mark@klomp.org \
--cc=dodji@seketeli.org \
--cc=libabigail@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).