Results 1 to 6 of 6

Thread: Viewing object files

  1. #1
    Join Date
    Jul 2005
    Beans
    12

    Question Viewing object files

    I want to know how to view *.o (object files) in ubuntu, but don't know what program to use - tried scite and gedit

  2. #2
    Join Date
    Sep 2005
    Beans
    190
    Distro
    Ubuntu Breezy 5.10

    Re: Viewing object files

    not sure why you would want to view compiler output, but they are binary files(compiler output), so i doubt you will find anything that views them in any human readable fashion.(maybe a decompiler), but, then, if you have object files, you likely have the source they were created from.

  3. #3
    Join Date
    Jul 2005
    Beans
    12

    Re: Viewing object files

    k, thanks, jus wondrin, i can be curious at times.

  4. #4
    Join Date
    Sep 2005
    Beans
    190
    Distro
    Ubuntu Breezy 5.10

    Re: Viewing object files

    Tis how we learn, right?

  5. #5
    Join Date
    Jan 2005
    Location
    Minneapolis, MN
    Beans
    510
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    Re: Viewing object files

    If you're really desparate/curious, you'd probably use a hex editor. If you happen to use Vim, you can view it there. To view it in Hex in Vim the commands are* "%!xxd" (to hex) and "%!xxd -r" (from hex). If you use Gvim (easier!) you can use the Tools menu.

    *If you don't know Vim, you'd have to learn it first as Vim has a steep learning curve. Once you learn it though, it's pretty handy.
    My projects and ramblings: http://stuporglue.org
    http://www.mormon.org/bookofmormon -- Free Book of Mormon

  6. #6
    Join Date
    Jan 2005
    Location
    Adelaide, Australia
    Beans
    340

    Re: Viewing object files

    The nm program will show you the symbols which are present in an object file, which can be very useful sometimes. Similarly, objdump will decompile the object to assembly, which also has its uses.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •