Linux under the Readelf program introduction __linux

Source: Internet
Author: User

1. Introduction

Readelf is used to display information about one or more object files in the elf format, and you can control which information is displayed by its options.


2. Parameter

-A--all displays all information, equivalent to-h-l-s-s-r-d-v-a-I.
-H--file-header Displays the file header information for the elf file to begin.
-L--program-headers--segments Displays the program header (segment header) information (if any).
-S--section-headers--sections Displays the section header information (if any).
-G--section-groups Displays section group information, if any.
-T--section-details displays the details of the section (-s).
-S--syms--symbols displays the items (if any) in the symbol table segment.
-e--headers Displays all header information, equivalent to:-h-l-S
-N--notes Displays the information for the note segment (kernel annotation).
-R--relocs Displays information about relocatable segments.
-U--unwind Displays unwind segment information. Only the unwind segment information of the IA64 Elf is currently supported.
-D--dynamic Displays information about the dynamic segment.
-V--version-info Displays the information for the version segment.
-A--arch-specific displays CPU architecture information.
-d--use-dynamic uses symbol tables in dynamic segments to display symbols instead of using symbol segments.
-X <number or name>--hex-dump=<number or name> displays the contents of the specified paragraph in 16-way. Number specifies the index in the middle of the section table, or the string specifies the name of the segment in the file.
-w[liaprmffsor] or--debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,= Ranges] Displays the contents specified in the Debug segment.
-I--histogram displays a histogram of the length of the bucket list when the symbol is displayed.
-V--version displays version information for readelf.
-H--help Displays the command line options supported by Readelf.
-W--wide wide row output.
@file can centralize options in one file and then use this @file option to load.


3, Example

1) display dynamic segment information
Readelf-d <file_name>
For example:
Readelf-d/BIN/RM
Dynamic section at offset 0x9420 contains entries:
Tag Type Name/value
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000c (INIT) 0x401470

。。。。


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.