Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

From: Dodji Seketeli
Date: Wed Dec 14 2016 - 05:12:16 EST


Michal Marek <mmarek@xxxxxxxx> a Ãcrit:

>> Libabigail does a "whole binary" analysis of types.
>>
>> So, consider the point of use of the type 'struct s1*'. Even if 'struct
>> s' is just forward-declared at that point, the declaration of struct s1
>> is "resolved" to its definition. Even if the definition comes later in
>> the binary.
>
> But there isn't any definition of struct s1 in t1.o. Does abidiff
> "steal" the definition from the other object file? That would be
> legitimate, I'm just curious.

If there is another translation unit in the *same* binary that defines
struct s1, then yes, it's "stolen", as you say.

But if in the entire binary, struct s1 is just declared (not defined),
then it'll compare equal to any struct s1 that is defined in the
*second* binary.

Cheers,

--
Dodji