Update old post about using C headers in ASM
This commit is contained in:
parent
62cc2f2eb8
commit
b20795b941
@ -3,6 +3,18 @@ title: "C headers in Asm"
|
|||||||
subtitle: "Cleaning up the build chain"
|
subtitle: "Cleaning up the build chain"
|
||||||
tags: [osdev]
|
tags: [osdev]
|
||||||
|
|
||||||
|
> **NOTE (2016-11-01)**
|
||||||
|
>
|
||||||
|
> Since people are apparently still finding this page four years later (yay! Cool URLs don't change!): I've since found a better and more correct way of doing this.
|
||||||
|
>
|
||||||
|
> If you're compiling using `gcc`, you can just name your assembly files (with includes and macros and stuff) `whatever.S` (capital S), and compile them right down to `whatever.o` as you normally would (using `gcc`, not `as`).
|
||||||
|
>
|
||||||
|
> GNU make also has a builtin rule that does this automatically... yeah...
|
||||||
|
>
|
||||||
|
> From this I've learned the following
|
||||||
|
> - Trust make. It's terribly powerful if you trust it to be.
|
||||||
|
> - GCC is not the GNU C Compiler. It's the GNU Compiler Collection.
|
||||||
|
|
||||||
Something that always annoyed me is how hard it is to synchronize constants
|
Something that always annoyed me is how hard it is to synchronize constants
|
||||||
between assembly and c code. In assembler, you define a constant value as
|
between assembly and c code. In assembler, you define a constant value as
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user