From afefb60a07e2f829b1d039b8d8285aa0d0bbbb9b Mon Sep 17 00:00:00 2001 From: Q <60785373+StarryCSF@users.noreply.github.com> Date: Sat, 3 Jan 2026 14:23:41 +0800 Subject: [PATCH] ld: add Chinese translation (#20498) --- pages.zh/common/ld.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages.zh/common/ld.md diff --git a/pages.zh/common/ld.md b/pages.zh/common/ld.md new file mode 100644 index 0000000000..f197875208 --- /dev/null +++ b/pages.zh/common/ld.md @@ -0,0 +1,16 @@ +# ld + +> 将目标文件链接在一起。 +> 更多信息:。 + +- 将一个没有依赖项的特定目标文件链接到可执行文件中: + +`ld {{路径/到/文件.o}} {{[-o|--output]}} {{路径/到/输出_可执行文件}}` + +- 将两个目标文件链接在一起: + +`ld {{路径/到/文件1.o}} {{路径/到/文件2.o}} {{[-o|--output]}} {{路径/到/输出_可执行文件}}` + +- 将一个 x86_64 程序动态链接到 glibc (文件路径根据系统而变化): + +`ld {{[-o|--output]}} {{路径/到/输出_可执行文件}} {{[-I|--dynamic-linker]}} /lib/ld-linux-x86-64.so.2 /lib/crt1.o /lib/crti.o -lc {{路径/到/文件.o}} /lib/crtn.o`