so so.*.*

时间:2023-03-09 03:56:47
so so.*.*

转自:http://unix.stackexchange.com/questions/5719/linux-gnu-gcc-ld-version-scripts-and-the-elf-binary-format-how-does-it-wor/10317#10317

First of all, ELF is the specification use by Linux for executable files (programs), shared libraries, and also object files which are the intermediate files found when compiling software. Object files end in .o, shared libraries end with .so followed by zero or more digits separated by periods, and executable files don't have any extension normally.

There are typically three forms to name a shared library, the first form simply ends in .so. For example, a library called readline is stored in a file called libreadline.so and is located under one of /lib, /usr/lib, or /usr/local/lib normally. That file is located when compiling software with an option like -lreadline. -l tells the compiler to link with the following library. Because libraries change from time to time, it may become obsolete so libraries embed something called a SONAME. The SONAME for readline might look like libreadline.so.2 for the second version major version of libreadline. There may also be many minor versions of readline that are compatible and do not require software to be recompiled. A minor version of readline might be named libreadline.so.2.14. Normally libreadline.so is just a symbolic link to the most recent major version of readline, libreadline.so.2 in this case. libreadline.so.2 is also a symbolic link to libreadline.so.2.14 which is actually the file being used.

The SONAME of a library is embedded inside the library file itself. Somewhere inside the file libreadline.so.2.14 is the string libreadline.so.2. When a program is compiled and linked with readline, it will look for the file libreadline.so and read the SONAME embedded in it. Later, when the program is actually executed, it will load libreadline.so.2, not just libreadline.so, since that was the SONAME that was read when it was first linked. This allows a system to have multiple incompatible versions of readline installed, and each program will load the appropriate major version it was linked with. Also, when upgrading readline, say, to 2.17, I can just install libreadline.so.2.17 alongside the existing library, and once I move the symbolic link libreadline.so.2 from libreadline.so.2.13 to libreadline.so.2.17, all software using that same major version will now see the new minor update to it.

随机推荐

  1. Dell3470无法开机或开机黑屏情况下检测屏幕是否正常

    故障现象:Dell3470无法开机,点击开关按键无任何反应 故障分析:释放静电后故障依旧.更换电源适配器后故障依旧,初判主板故障,无法确认屏是否正常 解决方法:除去拆机单独测试外,Dell售后告知一个 ...

  2. pyinstaller

    下载pyinstaller pip install pyinstaller 打包文件 pyinstaller -F run.py # 打包成单个文件

  3. idea maven指定编译参数

    "Settings" > "Build, Execution, Deployment" > "Compiler" > &q ...

  4. 用户和用户组y哦不过y哦那个好

    一.用户和用户组的简介? 介绍:https://blog.csdn.net/Na2Co3_Ren/article/details/74502309 二.用户可以分为3类? 1.主人:所有者的名字 2. ...

  5. .NET EF框架的安装、及三种开发模式

    一.EF框架的安装: 要在VS(如Visual Studio 2012)中使用EF框架,就需要先进行安装. 我们需要给这个应用安装EntityFramework包,引入EF框架相关的内容,我们需要引入 ...

  6. spring事务的7种传播行为

    https://blog.csdn.net/weixin_39625809/article/details/80707695 一般用于并发,分布式锁.复杂业务情况

  7. hadoop配置项笔记 - hdfs

    hadoop版本:3.1.1 core-site.xml dfs.namenode.rpc-address 作用:rpc地址.我在使用distcp时显式使用到了. 默认值:port是8020 我的设置 ...

  8. sublime Text 常用插件

    1.LocalizedMenu 语言插件 2.SublimeRPEL   这个我主要是用python,设置快捷键后很方便 3.以后用到什么再补充

  9. Jmeter 获取系统时间,和对系统时间进行增减时间

    今天做了一个测试,比如发送短信验证码之后的, 验证90s被验证码有效的问题 那如何测试开发的代码,判断了90s内有效呢1. 验证码获取时间距离现在89秒,验证通过2. 验证码获取时间距离现在90秒,验 ...

  10. vim编辑器-多行加注释与去注释

    在使用vim编辑器时,有时候需要对多行代码进行加注释或去注释,下面将介绍两种方法. 方法一:块选择模式 1. 插入注释 (1)首先按键盘上的ESC进入命令行模式 (2)再按Ctrl+V进入VISUAL ...