HOW TO OPEN .O FILE IN LINUX

2,210 views
Skip to first unread message

ANKIT

unread,
Aug 29, 2010, 12:02:28 PM8/29/10
to Linux User Group @ IIT Delhi
WHEN COMPILING A C CODE WITH GCC WITH OPTION -c
it generates object module in .o format

please tell howw to open it.

gedit and evince are unable to open this

bagari...@gmail.com

unread,
Aug 29, 2010, 12:19:00 PM8/29/10
to iit...@googlegroups.com


try vi editor



--

Thanks and Regards

Karan Bagaria
MCA Pre-Final Year
NIT Durgapur

Debasish Ray Chawdhuri

unread,
Aug 29, 2010, 12:36:22 PM8/29/10
to iit...@googlegroups.com
Use :%!xxd  to go to hex mode
:%!xxd -r to switch back




--
Debasish Ray Chawdhuri
Dept. of Textile Technology,
IIT Delhi

Sheel Sindhu Manohar

unread,
Sep 19, 2010, 1:35:41 AM9/19/10
to iit...@googlegroups.com
Failed to go into hex mode can u tell me full command on terminal .

--
________________________________
SHEEL SINDHU MANOHAR
Website: www.roboture.in
Twitter: http://twitter.com/ssmanohar
________________________________

gajendra khanna

unread,
Sep 19, 2010, 12:26:53 PM9/19/10
to iit...@googlegroups.com
> Failed to go into hex mode can u tell me full command on terminal .
tried with khexedit editor?
Message has been deleted

ANKIT SINGHAL

unread,
Sep 22, 2010, 3:54:38 AM9/22/10
to iit...@googlegroups.com


On Mon, Sep 20, 2010 at 8:53 AM, NAGAMOHAN YENUGANTI <naaga...@gmail.com> wrote:

 
On Sun, Sep 19, 2010 at 9:56 PM, gajendra khanna <gajendr...@gmail.com> wrote:
> Failed to go into hex mode can u tell me full command on terminal .
tried with khexedit editor?
 
check whether you installed the package xxd or not  ( by which xxd  or whereis xxd )
 
you can use the command  also like this to dump the hex code.
 
xxd abc.o > hex.txt
the command is right but the hex.txt generated is not understandable.
 


--
Thanking You
Y.NagaMohan
Integrated Electronics & Circuits ( 2007-09 )
M.Tech, IIT Delhi
+918050786558

NAGAMOHAN YENUGANTI

unread,
Sep 22, 2010, 4:15:29 AM9/22/10
to iit...@googlegroups.com
On Wed, Sep 22, 2010 at 1:24 PM, ANKIT SINGHAL <singhal...@gmail.com> wrote:


On Mon, Sep 20, 2010 at 8:53 AM, NAGAMOHAN YENUGANTI <naaga...@gmail.com> wrote:

 
On Sun, Sep 19, 2010 at 9:56 PM, gajendra khanna <gajendr...@gmail.com> wrote:
> Failed to go into hex mode can u tell me full command on terminal .
tried with khexedit editor?
 
check whether you installed the package xxd or not  ( by which xxd  or whereis xxd )
 
you can use the command  also like this to dump the hex code.
 
xxd abc.o > hex.txt
the command is right but the hex.txt generated is not understandable.
 
     Here hex.txt is a file, created by me, into which i am redirecting the command output ( stdout )
 


--
Thanking You
Y.NagaMohan
Integrated Electronics & Circuits ( 2007-09 )
M.Tech, IIT Delhi
+918050786558

h4nnibal

unread,
Sep 23, 2010, 6:59:59 AM9/23/10
to iit...@googlegroups.com
On Sun, Aug 29, 2010 at 21:32, ANKIT <singhal...@gmail.com> wrote:
WHEN COMPILING A C CODE WITH GCC WITH OPTION -c
it generates object module in .o format
> please tell howw to open it.

Well lests say the file to be abcd.o

if you want a good view in 'less' its better you use hexdump. its a frontend of xxd. the command is :

$hexdump -C abcd.o |less

you may redirect it to another file to use it later than running hexdump each time.

$hexdump -C abcd.o> abcd.txt

else you can use well known hex editor like 'Okteta' to get things done.

--
Arjun S R
College Of Engineering,Trivandrum
Facebook : http://www.facebook.com/Arjun.S.R

Reply all
Reply to author
Forward
0 new messages