[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Does removal of global variables from a library break C ABI?



On Wed, 18 Jan 2023, Peter Pentchev wrote:

On Tue, Jan 17, 2023 at 08:03:18PM -0800, Russ Allbery wrote:
Scott Talbert <swt@techie.net> writes:

In one of the library packages I maintain (hidapi), upstream removed a
couple of global variables (my .symbols file noticed this).  See
abipkgdiff below.

Does this break ABI?  My assessment is that it does NOT, but I would
like to confirm.  These variables were not declared in a header file, so
I can't see how external user code would have referenced them.

It does technically, but if the variables were never declared in a header
file, it's equivalent to hiding private functions that were previously
exposed by mistake but never prototyped for users.  Traditionally, we
don't consider that an ABI break worth bumping the soname unless we have
some reason to believe that software is using those symbols.

JFTR (I'm pretty sure that both Scott and Russ know this),
https://sources.debian.org/ can help one figure out whether some other
Debian package uses them.

Thanks Russ and Peter. I didn't find any usage of these symbols, but I did sadly find a lot of bundled copies of this library in the archive. :(

Scott


Reply to: