tldr/pages.zh/linux/as.md

21 lines
509 B
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# as
> 一个可移植的GUN汇编器.
> 主要用于汇编`gcc`的输出,以供链接器`ld`使用.
- 汇编一个文件输出为a.out:
`as {{文件.s}}`
- 汇编文件,并指定输出文件:
`as {{文件.s}} -o {{输出.o}}`
- 通过跳过空格和注释的预处理过程来更快的产生输出文件(只应该用于可信任的编译器的输出):
`as -f {{文件.s}}`
- 将给定路径添加到目录列表,来搜索.include指令指定的文件:
`as -I {{目录路径}} {{文件.s}}`