How to obtain assembler code when compiling C++ on Linux environments?

Hello. I was asked in a scool project to obtain the assembler code generated when compiling C++ code on a unix environment.

I know in fancy IDEs theres usually an option to generate this code, but on the linux computer I have to work with, I am limited to gcc/g++ compilers and editing in vi/pico.

So, does anyone know how can I get the assembler code?

Thank you.

Comments

  • : Hello. I was asked in a scool project to obtain the assembler code generated when compiling C++ code on a unix environment.
    :
    : I know in fancy IDEs theres usually an option to generate this code, but on the linux computer I have to work with, I am limited to gcc/g++ compilers and editing in vi/pico.
    :
    : So, does anyone know how can I get the assembler code?
    :
    Give gcc the -S switch to get it to stop at the assembly stage and generate assembly code instead of going on to assemble.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion