tldr/pages/osx/as.md

22 lines
642 B
Markdown
Raw Normal View History

2018-06-13 17:48:28 +01:00
# as
> Portable GNU assembler.
> Primarily intended to assemble output from `gcc` to be used by `ld`.
> More information: <https://www.unix.com/man-page/osx/1/as/>.
2018-06-13 17:48:28 +01:00
- Assemble a file, writing the output to `a.out`:
2018-06-13 17:48:28 +01:00
`as {{path/to/file.s}}`
2018-06-13 17:48:28 +01:00
- Assemble the output to a given file:
`as {{path/to/file.s}} -o {{path/to/output_file.o}}`
2018-06-13 17:48:28 +01:00
- Generate output faster by skipping whitespace and comment preprocessing. (Should only be used for trusted compilers):
`as -f {{path/to/file.s}}`
2018-06-13 17:48:28 +01:00
- Include a given path to the list of directories to search for files specified in `.include` directives:
2018-06-13 17:48:28 +01:00
`as -I {{path/to/directory}} {{path/to/file.s}}`