linux中查询动态库版本的命令,linux动态库版本号管理

The shared library soname (cont.)

This diagram shows the steps that occur as the program is executed:

uid-24907956-id-3979339.html

Compatible Versus Incompatible Libraries

We probably need to change a library over time.

A new library version is said to be compatible with an existing library version if all of the following conditions hold true:

The semantics of each function in the library remain unchanged.

All functions continue to produce same effect on global variables and returned arguments.

All functions continue to return the same result values.

Performance improvements and bug fixes (perhaps resulting in closer conformance to specified behavior) are compatible changes.

No function in the library API is removed.

New functions can be added.

The structures exported (i.e. allocated within and returned) by each function remain unchanged.

Possible exception: new items may be added to the end of the existing structure

If any of these conditions is violated, then the new library version is incompatible with the previous version.

Shared library versions and naming

If a new version of a shared library is compatible with an existing library, we can make a new minor version of the library.

If a new version of a shared library is incompatible with an existing library, we must make a new major version of the library.

Constraint: it must be possible to continue running programs requiring the older version of the library.

Solution: a naming convention is used for shared library real names and sonames.

Shared library versions and naming (cont.)

Real name

Name of the file containing library code.

Format: libname.so.major-id.minor-id

Major version identifieris a number which is sequentially incremented with each incompatible release of the library.

Minor version identifier distinguishes different compatible minor versions of a library within the same major version.

Usually either a number, or two numbers sep

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值