LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-06-2007, 04:58 AM   #1
andyzn
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Rep: Reputation: 0
readelf and objdump


andyzn@Kernel:~/ttt/asm$ objdump -s -j .dtors test

test: file format elf32-i386

Contents of section .dtors:
8049488 ffffffff 00000000 ........
~~~~~~~~~~~~~~~~~~~~
This is different from below. why?

andyzn@Kernel:~/ttt/asm$ readelf -x 18 test

Hex dump of section '.dtors':
0x08049488 00000000 ffffffff ........
~~~~~~~~~~~~~~~~~~~~ Here
 
Old 12-06-2007, 05:08 AM   #2
andyzn
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Original Poster
Rep: Reputation: 0
It is clear now.

"test" is a helloworld program.

Now I add a destructor and then everything is clear

We can see readelf print byte by byte from high to low

but objdump from low to high.

andyzn@Kernel:~/ttt/asm$ readelf -x 18 test
Hex dump of section '.dtors':
0x08049508 00000000 080483f3 ffffffff ............


andyzn@Kernel:~/ttt/asm$ objdump -s -j .dtors test
test: file format elf32-i386
Contents of section .dtors:
8049508 ffffffff f3830408 00000000 ............
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
output of readelf -a vmlinux ashlesha Linux - Software 0 09-06-2006 12:39 PM
total size of segments reported by Readelf/Objdump doesn't match symbol table sizes quartermaster Linux - Software 1 08-11-2006 01:31 PM
when objdump is applied on vmlinux topworld Linux - Software 0 03-31-2006 01:05 AM
objdump usage cranium2004 Linux - Newbie 0 01-20-2005 01:00 AM
Using objdump for decompiling JIV Programming 0 06-13-2004 08:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration