Re: [PATCH bpf v3] libbpf: handle symbol versioning properly for libbpf.a

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

 




On 9/30/19 9:42 AM, Alexei Starovoitov wrote:
> On 9/30/19 9:29 AM, Yonghong Song wrote:
>> +OLD_VERSION(xsk_umem__create_v0_0_2, xsk_umem__create, LIBBPF_0.0.2)
>> +NEW_VERSION(xsk_umem__create_v0_0_4, xsk_umem__create, LIBBPF_0.0.4)
> 
> how this will look when yet another version of this function is
> introduced, say in 0.0.6 ?
> 
> OLD_VERSION(xsk_umem__create_v0_0_2, xsk_umem__create, LIBBPF_0.0.2)
> OLD_VERSION(xsk_umem__create_v0_0_4, xsk_umem__create, LIBBPF_0.0.4)
> NEW_VERSION(xsk_umem__create_v0_0_6, xsk_umem__create, LIBBPF_0.0.6)

Yes.

> 
> 0.0.4 will be renamed to OLD_ and the latest addition NEW_ ?

Right.

> The macro name feels a bit confusing. May be instead of NEW_
> call it CURRENT_ ? or DEFAULT_ ?
> NEW_ will become not so 'new' few months from now.

Right. After a few months, the version number may indeed be
behind the libbpf versions.... "current" may not be current ....
Let me use DEFAULT then. How about using
    COMPAT_VERSION(...)
for old versions, and using
    DEFAULT_VERSION(...)
for the new version?




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux