当前课程知识点:Linux操作系统分析 > 第七周:可执行程序的装载 > 2 可执行程序、共享库和动态链接 > 外部链接
装载时动态链接和运行时动态链接应用举例
动态链接分为可执行程序装载时动态链接和运行时动态链接,如下代码演示了这两种动态链接。
准备.so文件
shlibexample.h (1.3 KB) - Interface of Shared Lib Example
shlibexample.c (1.2 KB) - Implement of Shared Lib Example
编译成libshlibexample.so文件
dllibexample.h (1.3 KB) - Interface of Dynamical Loading Lib Example
dllibexample.c (1.3 KB) - Implement of Dynamical Loading Lib Example
编译成libdllibexample.so文件
分别以共享库和动态加载共享库的方式使用libshlibexample.so文件和libdllibexample.so文件
main.c (1.9 KB) - Main program
编译main,注意这里只提供shlibexample的-L(库对应的接口头文件所在目录)和-l(库名,如libshlibexample.so去掉lib和.so的部分),并没有提供dllibexample的相关信息,只是指明了-ldl
源文件代码如附件
-1 存储程序计算机工作模型
--Video
-1 存储程序计算机工作模型--作业
-2 32位X86汇编基础
--Video
--Video
--Video
--Video
--外部链接
--Video
--外部链接
-2 32位X86汇编基础--作业
-3 汇编一个简单的C程序
--Video
--外部链接
--Video
--Video
--外部链接
-单元测验--作业
-实验作业
--外部链接
-随堂小测--作业
-1 函数调用堆栈
--Video
--html
--Video
--Video
--外部链接
-2 借助Linux内核部分源代码模拟存储程序计算机工作模型及时钟中断
--Video
--外部链接
--Video
--外部链接
-3 构造一个简单的操作系统内核
--Video
--Video
--Video
-4 单元测验--作业
-实验作业
--外部链接
-随堂小测--作业
-1 Linux内核源代码导读
--Video
--外部链接
-2 构造一个简单的Linux系统
--Video
--外部链接
-3 跟踪调试Linux内核的启动过程
--Video
--外部链接
--Video
--外部链接
-4 单元测验--作业
-实验作业
--外部链接
-随堂小测--作业
-1 使用库函数触发一个系统调用
--Video
--Video
--Video
-2 C代码中嵌入汇编代码的写法
--Video
-3 使用嵌入式汇编代码触发同一个系统调用
--Video
-单元测验--作业
-实验作业
--外部链接
-随堂小测--作业
-给MenuOS增加time和time-asm命令
--Video
-使用gdb跟踪系统调用内核函数sys_time
--Video
-系统调用在内核代码中的处理过程
--Video
--Video
--Video
-单元测验--作业
-实验作业
--外部链接
-随堂小测--作业
-1.进程的描述
--Video
--外部链接
--Video
--外部链接
-2.进程的创建
--Video
--外部链接
--Video
--Video
--Video
--Video
-单元测验--作业
-实验作业
--外部链接
-随堂小测--作业
-1 预处理、编译、链接和目标文件的格式
--Video
--外部链接
--Video
--外部链接
--Video
--外部链接
-2 可执行程序、共享库和动态链接
--Video
--外部链接
--Video
--外部链接
-3 可执行程序的装载
--Video
--外部链接
--Video
--外部链接
--Video
--Video
--Video
-单元测验--作业
-实验作业
--外部链接
-随堂小测--作业
-1 进程切换的关键代码switch_to分析
--Video
--外部链接
--Video
--外部链接
-2 Linux系统的一般执行过程
--Video
--外部链接
--Video
--外部链接
--Video
-3 Linux系统架构和执行过程概览
--Video
--Video
--Video
-单元测验--作业
-实验作业
--外部链接
-随堂小测--作业
-客观题部分--作业
-主观题部分
--外部链接
-主观题部分--作业




