Thread: Generate Assembly code and Binary code also

  1. #16
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    $ objdump -d a.out > big.S
    $ objdump -d foo.o > small.S
    $ ls -l *.S
    -rw-r--r-- 1 sc sc 15313 2011-07-07 07:36 big.S
    -rw-r--r-- 1 sc sc 5566 2011-07-07 07:36 small.S

    You can run objdump on object files and executables, and get the asm.
    But these would be huge files for a project of any size.

    What are you planning to do with them once you've got them?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #17
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    "gcc <with -S> && gcc <normally> " ...and different names in -o
    be enough to solve your problem as suggested by 'tabstop' to run gcc twice?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert assembly>machine code, machine code>assembly
    By wenxinleong in forum C Programming
    Replies: 12
    Last Post: 06-23-2011, 10:42 PM
  2. Converting C code to DLX assembly code
    By xyz3 in forum C Programming
    Replies: 2
    Last Post: 05-17-2010, 02:01 PM
  3. GCC option to get assembly code AND C code
    By AntoineC in forum C Programming
    Replies: 2
    Last Post: 04-29-2010, 09:04 AM
  4. assembly code for release code?
    By George2 in forum Windows Programming
    Replies: 4
    Last Post: 07-09-2008, 11:17 AM
  5. To generate bar code from a number
    By darkducke in forum C Programming
    Replies: 18
    Last Post: 01-16-2008, 06:33 AM