
{"id":6431,"date":"2011-12-12T13:34:57","date_gmt":"2011-12-12T13:34:57","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=6431"},"modified":"2011-12-12T13:34:57","modified_gmt":"2011-12-12T13:34:57","slug":"readelf-a-option-displays-information-about-elf-files","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2011\/12\/12\/readelf-a-option-displays-information-about-elf-files\/","title":{"rendered":"readelf   (-a option)  Displays information about ELF files"},"content":{"rendered":"<h4><u> UNIX Command <\/u><\/h4>\n<pre>\n$cat hello.c\n#include\nmain()\n{\nint d;\nscanf(\"%d\",d);\nprintf(\"%d\",d);\n}\n$gcc hello.c\n$ulimit -c unlimited\n$.\/a.out\n3\nSegmentation fault (core dumped)\n$readelf -s core\n$readelf -a core\nELF Header:\n  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00\n  Class:                             ELF64\n  Data:                              2's complement, little endian\n  Version:                           1 (current)\n  OS\/ABI:                            UNIX - System V\n  ABI Version:                       0\n  Type:                              CORE (Core file)\n  Machine:                           Advanced Micro Devices X86-64\n  Version:                           0x1\n  Entry point address:               0x0\n  Start of program headers:          64 (bytes into file)\n  Start of section headers:          0 (bytes into file)\n  Flags:                             0x0\n  Size of this header:               64 (bytes)\n  Size of program headers:           56 (bytes)\n  Number of program headers:         17\n  Size of section headers:           0 (bytes)\n  Number of section headers:         0\n  Section header string table index: 0\n\nThere are no sections in this file.\n\nThere are no sections to group in this file.\n\nProgram Headers:\n  Type           Offset             VirtAddr           PhysAddr\n                 FileSiz            MemSiz              Flags  Align\n  NOTE           0x00000000000003f8 0x0000000000000000 0x0000000000000000\n                 0x0000000000000558 0x0000000000000000         0\n  LOAD           0x0000000000001000 0x0000000000400000 0x0000000000000000\n                 0x0000000000001000 0x0000000000001000  R E    1000\n  LOAD           0x0000000000002000 0x0000000000600000 0x0000000000000000\n                 0x0000000000001000 0x0000000000001000  RW     1000\n  LOAD           0x0000000000003000 0x00007f1e480c7000 0x0000000000000000\n                 0x0000000000001000 0x000000000017a000  R E    1000\n  LOAD           0x0000000000004000 0x00007f1e48241000 0x0000000000000000\n                 0x0000000000000000 0x0000000000200000         1000\n  LOAD           0x0000000000004000 0x00007f1e48441000 0x0000000000000000\n                 0x0000000000004000 0x0000000000004000  R      1000\n  LOAD           0x0000000000008000 0x00007f1e48445000 0x0000000000000000\n                 0x0000000000001000 0x0000000000001000  RW     1000\n  LOAD           0x0000000000009000 0x00007f1e48446000 0x0000000000000000\n                 0x0000000000005000 0x0000000000005000  RW     1000\n  LOAD           0x000000000000e000 0x00007f1e4844b000 0x0000000000000000\n                 0x0000000000001000 0x000000000001f000  R E    1000\n  LOAD           0x000000000000f000 0x00007f1e48643000 0x0000000000000000\n                 0x0000000000003000 0x0000000000003000  RW     1000\n  LOAD           0x0000000000012000 0x00007f1e48667000 0x0000000000000000\n                 0x0000000000003000 0x0000000000003000  RW     1000\n  LOAD           0x0000000000015000 0x00007f1e4866a000 0x0000000000000000\n                 0x0000000000001000 0x0000000000001000  R      1000\n  LOAD           0x0000000000016000 0x00007f1e4866b000 0x0000000000000000\n                 0x0000000000001000 0x0000000000001000  RW     1000\n  LOAD           0x0000000000017000 0x00007f1e4866c000 0x0000000000000000\n                 0x0000000000001000 0x0000000000001000  RW     1000\n  LOAD           0x0000000000018000 0x00007fff27f53000 0x0000000000000000\n                 0x0000000000022000 0x0000000000022000  RW     1000\n  LOAD           0x000000000003a000 0x00007fff27fff000 0x0000000000000000\n                 0x0000000000001000 0x0000000000001000  R E    1000\n  LOAD           0x000000000003b000 0xffffffffff600000 0x0000000000000000\n                 0x0000000000000000 0x0000000000001000  R E    1000\n\nThere is no dynamic section in this file.\n\nThere are no relocations in this file.\n\nThere are no unwind sections in this file.\n\nNo version information found in this file.\n\nNotes at offset 0x000003f8 with length 0x00000558:\n  Owner                 Data size\tDescription\n  CORE                 0x00000150\tNT_PRSTATUS (prstatus structure)\n  CORE                 0x00000088\tNT_PRPSINFO (prpsinfo structure)\n  CORE                 0x00000130\tNT_AUXV (auxiliary vector)\n  CORE                 0x00000200\tNT_FPREGSET (floating point registers)\n$\n\n<\/pre>\n<p><\/p>\n<h4><u>UNIX Explanation <\/u><\/h4>\n<pre>\nreadelf displays  information about one  or more ELF  format object\nfiles.  The options control what particular information to display.\nelffile... are the object files  to be examined.  32-bit and 64-bit\nELF  files are  supported, as  are archives  containing  ELF files.\nThis program  performs a  similar function to  objdump but  it goes\ninto more detail and it exists independently of the BFD library, so\nif there is a bug in BFD then readelf will not be affected.\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>UNIX Command $cat hello.c #include main() { int d; scanf(&#8220;%d&#8221;,d); printf(&#8220;%d&#8221;,d); } $gcc hello.c $ulimit -c unlimited $.\/a.out 3 Segmentation fault (core dumped) $readelf -s core $readelf -a core ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2&#8217;s complement, little endian &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2011\/12\/12\/readelf-a-option-displays-information-about-elf-files\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;readelf   (-a option)  Displays information about ELF files&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6431"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=6431"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6431\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=6431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=6431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=6431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}