On 03/23/2019 01:28 AM, Stanislav Fomichev wrote:
> On 03/23, Daniel Borkmann wrote:
>> On 03/23/2019 01:09 AM, Stanislav Fomichev wrote:
>>> On 03/23, Daniel Borkmann wrote:
>> [...]
>>>> +$(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN)
>>>> +  $(QUIET_LINK)$(CC) --shared -Wl,-soname,libbpf.so.$(LIBBPF_VERSION) \
>>> Shouldn't it be -soname,libbpf.so.$(VERSION) ?
>>
>> The above is generating libbpf.so.0.0.2, and with the below two we generate
>> symlinks to it. libbpf.so.$(VERSION) would result in libbpf.so.0 otherwise
>> which we want to be a symlink instead. The workflow I've been following is
>> similar to fe316723a810 ("tools lib traceevent: Add version for traceevent
>> shared object").
> Sorry, I was not clear enough, I was talking about -Wl,-soname linker option.
> Shouldn't it contain "major" version?
> 
> $ readelf -d libtraceevent.so.1.1.0 | grep SONAME
>  0x000000000000000e (SONAME)             Library soname: [libtraceevent.so.1]
> 
> With your patch applied:
> $ readelf -d libbpf.so.0.0.2 | grep SONAME
>  0x000000000000000e (SONAME)             Library soname: [libbpf.so.0.0.2]
> 
>                                                           ^^^^^^^^^^^^^
>                                                         libbpf.so.0 ?

Heh, agree, good catch indeed. v2 coming.

Reply via email to