Linux中readelf命令介绍

本文主要介绍在Linux操作系统中的 readelf 命令的相关内容。

0 ELF

在介绍 readelf 之前,首先需要讲一下 ELF,这里直接引用了 wikipedia 中 ELF 的(部分)介绍内容:

In computing, the Executable and Linkable Format (ELF, formerly named Extensible Linking Format), is a common standard file format for executable files, object code, shared libraries, and core dumps. First published in the specification for the application binary interface (ABI) of the Unix operating system version named System V Release 4 (SVR4), and later in the Tool Interface Standard, it was quickly accepted among different vendors of Unix systems. In 1999, it was chosen as the standard binary file format for Unix and Unix-like systems on x86 processors by the 86open project.

By design, the ELF format is flexible, extensible, and cross-platform. For instance it supports different endiannesses and address sizes so it does not exclude any particular central processing unit (CPU) or instruction set architecture. This has allowed it to be adopted by many different operating systems on many different hardware platforms.

1 概述

readelf - Displays information about ELF files.

readelf displays information about one or more ELF format object files.  The options control what particular information to display.

This program performs a similar function to objdump but it goes into more detail and it exists independently of the BFD library, so if there is a bug in BFD then readelf will not be affected.

2 语法

readelf [option]... elffile...

elffile... are the object files to be examined.  32-bit and 64-bit ELF files are supported, as are archives containing ELF files.

3 用法介绍

-d选项,--dynamic:Displays the contents of the file's dynamic section, if it has one.
 

猜你喜欢

转载自blog.csdn.net/liitdar/article/details/81279416
今日推荐