From f2552a4b32120803154ceee21615f1bc8a364bb3 Mon Sep 17 00:00:00 2001 From: shzhxh Date: Wed, 5 Aug 2020 16:36:17 +0800 Subject: [PATCH] update some cmds --- Software/vim.md | 8 ++++---- Software/编译工具/gcc.md | 1 + Software/编译工具/ldconfig.md | 1 + Software/编译工具/lds链接脚本.md | 8 +++++--- Software/设备管理/umount.md | 5 +++++ 5 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 Software/编译工具/ldconfig.md diff --git a/Software/vim.md b/Software/vim.md index 1b97611..1d32f1b 100644 --- a/Software/vim.md +++ b/Software/vim.md @@ -140,10 +140,10 @@ V # 选择,以行为单位 k //向上移动 h //向左移动 l //向右移动 - ctrl+f // 向下翻页 - ctrl+b // 向上翻页 - ctrl+d // 向下翻半页 - ctrl+u // 向上翻半页 + ctrl+f // 向下翻页,front + ctrl+b // 向上翻页,back + ctrl+d // 向下翻半页,down + ctrl+u // 向上翻半页,up w # 移动到下个单词的第一个字符 e # 移动到下个单词的最后一个字符 diff --git a/Software/编译工具/gcc.md b/Software/编译工具/gcc.md index 0a3a9bf..1c1a8ea 100644 --- a/Software/编译工具/gcc.md +++ b/Software/编译工具/gcc.md @@ -94,6 +94,7 @@ gcc一般会进行预处理,编译,汇编,连接四步。 -pie # 产生一个动态链接的位置无关可执行文件。为获得一个可预测的结果,还需要指定编译时对应的选项(-fpic, -fPIE, 或模型子选项)。 -no-pie # 不要产生动态链接的位置无关可执行文件。 -l # 指定要链接的库。默认为系统的库的路径。可查看/etc/ld.so.conf文件获取系统库路径的详情。 +-static # 覆盖-pie选项,且不链接到共享库。 -T # 指定链接脚本。在没有操作系统的裸板上,可能需要-T选项来避免对未定义符号的引用。可以在搜索“lds链接脚本”关键字得到更详细信息。 -Wl,option # 把option作为选项传递给链接器。如果option里包含逗号,传递给链接器的时候逗号会被替换为空格,这个语法的好处是:可以传递多个选项过去,或者给选项指定一个参数。 ``` diff --git a/Software/编译工具/ldconfig.md b/Software/编译工具/ldconfig.md new file mode 100644 index 0000000..5663713 --- /dev/null +++ b/Software/编译工具/ldconfig.md @@ -0,0 +1 @@ +配置动态链接器运行时绑定 \ No newline at end of file diff --git a/Software/编译工具/lds链接脚本.md b/Software/编译工具/lds链接脚本.md index f3de5cd..43b05e2 100644 --- a/Software/编译工具/lds链接脚本.md +++ b/Software/编译工具/lds链接脚本.md @@ -1,5 +1,3 @@ -[Linker Scripts](https://sourceware.org/binutils/docs/ld/Scripts.html) - #### 脚本格式 链接脚本由一系列命令组成。 @@ -120,4 +118,8 @@ SECTIONS命令告诉链接器如何把输入文件的sections映射到输出文 - 如果指定的输入文件不能识别为object或archive,将会尝试把它作为链接脚本。如果此文件不能按链接脚本解析,链接器将会报错。 - 隐式链接脚本不会取代默认链接脚本。 - 一般来说,隐式的链接脚本仅包含符号赋值,或INPUT,GROUP,或VERSION命令。 -- 作为隐式链接脚本的输入文件,其内容会放到读取它的命令的那个位置。这会影响archive搜索。 \ No newline at end of file +- 作为隐式链接脚本的输入文件,其内容会放到读取它的命令的那个位置。这会影响archive搜索。 + +#### 参考资料 + +[Linker Scripts](https://sourceware.org/binutils/docs/ld/Scripts.html) \ No newline at end of file diff --git a/Software/设备管理/umount.md b/Software/设备管理/umount.md index ae40d14..fadb54a 100644 --- a/Software/设备管理/umount.md +++ b/Software/设备管理/umount.md @@ -10,3 +10,8 @@ umount [options] # 解除对指定文件系统的挂载 -l, --lazy # 立即把要卸载的文件系统分离出来,当它不处于busy状态时马上清空对它的引用 ``` +#### 问题处理 + +1. target is busy + + 通过`fuser`或`lsof`命令找到占用设备的进程,把它kill掉。 \ No newline at end of file