Skip to content

Comment on Understanding C by learning assembly

Comments

You can run gcc with the -S flag, which will dump the assembler output (so you dont have to go through gdb)

You can also use `objdump` from binutils

gcc -S is usually preferable, since you don't get all the code produced/included by the linker to get the thing running.

And using gcc -S allows you to get a few extra annotations (variable names etc.) using the -fverbose-asm flag.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.