Update ld.md
This commit is contained in:
parent
f71227c949
commit
1d577c72f2
|
|
@ -11,6 +11,7 @@ ld
|
|||
|
||||
```
|
||||
ld(选项)(参数)
|
||||
ld [options] objfile ...
|
||||
```
|
||||
|
||||
### 选项
|
||||
|
|
@ -24,5 +25,14 @@ ld(选项)(参数)
|
|||
|
||||
目标文件:指定需要连接的目标文件。
|
||||
|
||||
### 实例
|
||||
|
||||
这告诉ld通过将文件“/lib/crt0.o”与“hello.o”和库“libc.a”链接起来,生成一个名为output的文件,该文件将来自标准搜索目录。
|
||||
|
||||
```bash
|
||||
ld -o <output> /lib/crt0.o hello.o -lc
|
||||
ld -o output /lib/crt0.o hello.o -lc
|
||||
```
|
||||
|
||||
|
||||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
|
||||
Loading…
Reference in New Issue