linux中readelf命令详解
readelf
用于显示elf格式文件的信息
补充说明
readelf命令 用来显示一个或者多个elf格式的目标文件的信息,可以通过它的选项来控制显示哪些信息。这里的elf-file(s)就表示那些被检查的文件。可以支持32位,64位的elf格式文件,也支持包含elf文件的文档(这里一般指的是使用ar命令将一些elf文件打包之后生成的例如lib*.a之类的“静态库”文件)。
这个程序和objdump提供的功能类似,但是它显示的信息更为具体,并且它不依赖BFD库(BFD库是一个GNU项目,它的目标就是希望通过一种统一的接口来处理不同的目标文件),所以即使BFD库有什么bug存在的话也不会影响到readelf程序。
运行readelf的时候,除了-v和-H之外,其它的选项必须有一个被指定。
ELF文件类型
种类型的ELF文件:
- 可重定位文件:用户和其他目标文件一起创建可执行文件或者共享目标文件,例如lib*.a文件。
- 可执行文件:用于生成进程映像,载入内存执行,例如编译好的可执行文件a.out。
- 共享目标文件:用于和其他共享目标文件或者可重定位文件一起生成elf目标文件或者和执行文件一起创建进程映像,例如lib*.so文件。
ELF文件作用:
ELF文件参与程序的连接(建立一个程序)和程序的执行(运行一个程序),所以可以从不同的角度来看待elf格式的文件:
- 如果用于编译和链接(可重定位文件),则编译器和链接器将把elf文件看作是节头表描述的节的集合,程序头表可选。
- 如果用于加载执行(可执行文件),则加载器则将把elf文件看作是程序头表描述的段的集合,一个段可能包含多个节,节头表可选。
- 如果是共享文件,则两者都含有。
ELF文件总体组成:
elf文件头描述elf文件的总体信息。包括:系统相关,类型相关,加载相关,链接相关。
- 系统相关表示:elf文件标识的魔术数,以及硬件和平台等相关信息,增加了elf文件的移植性,使交叉编译成为可能。
- 类型相关就是前面说的那个类型。
- 加载相关:包括程序头表相关信息。
- 链接相关:节头表相关信息。
选项
-a
--all 显示全部信息,等价于 -h -l -S -s -r -d -V -A -I. -h
--file-header 显示elf文件开始的文件头信息. -l
--program-headers
--segments 显示程序头(段头)信息(如果有的话)。 -S
--section-headers
--sections 显示节头信息(如果有的话)。 -g
--section-groups 显示节组信息(如果有的话)。 -t
--section-details 显示节的详细信息(-S的)。 -s
--syms
--symbols 显示符号表段中的项(如果有的话)。 -e
--headers 显示全部头信息,等价于: -h -l -S -n
--notes 显示note段(内核注释)的信息。 -r
--relocs 显示可重定位段的信息。 -u
--unwind 显示unwind段信息。当前只支持IA64 ELF的unwind段信息。 -d
--dynamic 显示动态段的信息。 -V
--version-info 显示版本段的信息。 -A
--arch-specific 显示CPU构架信息。 -D
--use-dynamic 使用动态段中的符号表显示符号,而不是使用符号段。 -x <number or name>
--hex-dump=<number or name> 以16进制方式显示指定段内内容。number指定段表中段的索引,或字符串指定文件中的段名。 -w[liaprmfFsoR] or
--debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges] 显示调试段中指定的内容。 -I
--histogram 显示符号的时候,显示bucket list长度的柱状图。 -v
--version 显示readelf的版本信息。 -H
--help 显示readelf所支持的命令行选项。 -W
--wide 宽行输出。 @file 可以将选项集中到一个文件中,然后使用这个@file选项载入。
实例
先给出如下例子:
1.对于可执行文件形式的elf格式文件:
1)查看可执行程序的源代码如下:
root@localhost [test]$ cat main.cpp
#include <iostream>
using std::cout;
using std::endl;
void my_print(); int main(int argc, char *argv[])
{ my_print(); cout<<"hello!"<<endl; return 0;
} void my_print()
{ cout<<"print!"<<endl;
}
2)编译如下:
[root@localhost test]$ g++ main.cpp -o main
[root@localhost test]$ g++ -g main.cpp -o main.debug
3)编译之后,查看生成的文件:
[root@localhost test]$ ls -l
总计 64
-rwxr-xr-x 1 quietheart quietheart 6700 07-07 18:04 main
-rw-r--r-- 1 quietheart quietheart 201 07-07 18:02 main.cpp
-rwxr-xr-x 1 quietheart quietheart 38932 07-07 18:04 main.debug
这里,main.debug是带有调试信息的可执行文件,main是一般的可执行文件。
2.对于库文件形式的elf格式文件:
1)查看库的源代码如下:
//myfile.h
#ifndef __MYFILE_H
#define __MYFILE_H
void printInfo();
#endif //myfile.cpp
#include "myfile.h"
#include <iostream>
using std::cout;
using std::endl;
void printInfo()
{ cout<<"hello"<<endl;
}
2)编译如下:
[root@localhost test]$ g++ -c myfile.cpp
[root@localhost test]$ g++ -shared -fPCI -o libmy.so myfile.o
[root@localhost test]$ ar -r libmy.a myfile.o
ar: creating libmy.a
3)编译之后,查看生成的文件:
[root@localhost test]$ ls -l
总计 44
-rw-r--r-- 1 quietheart quietheart 2154 07-08 16:14 libmy.a
-rwxr-xr-x 1 quietheart quietheart 5707 07-08 16:08 libmy.so
-rwxr-xr-x 1 quietheart quietheart 117 07-08 16:06 myfile.cpp
-rwxr-xr-x 1 quietheart quietheart 63 07-08 16:08 myfile.h
-rw-r--r-- 1 quietheart quietheart 2004 07-08 16:08 myfile.o
libmy.a libmy.so myfile.cpp myfile.h myfile.o
这里,分别生成目标文件myfile.o,共享库文件libmy.so,和静态库文件libmy.a。
基于以上可执行文件和库,这里给出一些常用的命令。
读取可执行文件形式的elf文件头信息:
[root@localhost test]$ readelf -h main
ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 type: exec (Executable file) Machine: Intel 80386 Version: 0x1 Entry point address: 0x8048580 Start of program headers: 52 (bytes into file) Start of section headers: 3232 (bytes into file) Flags: 0x0 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 8 Size of section headers: 40 (bytes) Number of section headers: 29 Section header string table index: 26
这里,可见可执行文件的elf文件,其类型为EXEC(可执行文件)。另外,含调试信息的"main.debug"和不含调试信息的"main"除了一些大小信息之外,其内容是一样的。并且由此可见文件的体系结构为Intel 80386。
读取目标文件形式的elf文件头信息:
[root@localhost test]$ readelf -h myfile.o
ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: REL (Relocatable file) Machine: Intel 80386 Version: 0x1 Entry point address: 0x0 Start of program headers: 0 (bytes into file) Start of section headers: 516 (bytes into file) Flags: 0x0 Size of this header: 52 (bytes) Size of program headers: 0 (bytes) Number of program headers: 0 Size of section headers: 40 (bytes) Number of section headers: 15 Section header string table index: 12
这里,可见目标文件的elf文件,其类型为REL(可重定位文件)。
读取静态库文件形式的elf文件头信息:
[root@localhost test]$ readelf -h libmy.a
File: libmy.a(myfile.o)
ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: REL (Relocatable file) Machine: Intel 80386 Version: 0x1 Entry point address: 0x0 Start of program headers: 0 (bytes into file) Start of section headers: 516 (bytes into file) Flags: 0x0 Size of this header: 52 (bytes) Size of program headers: 0 (bytes) Number of program headers: 0 Size of section headers: 40 (bytes) Number of section headers: 15 Section header string table index: 12
这里,可见静态库文件的elf文件,其类型为REL(可重定位文件)。
读取动态库文件形式的elf文件头信息:
[root@localhost test]$ readelf -h libmy.so
ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: DYN (Shared object file) Machine: Intel 80386 Version: 0x1 Entry point address: 0x550 Start of program headers: 52 (bytes into file) Start of section headers: 2768 (bytes into file) Flags: 0x0 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 5 Size of section headers: 40 (bytes) Number of section headers: 27 Section header string table index: 24
这里,可见动态库文件的elf文件,其类型为DYN(共享目标文件)。
查看可执行的elf文件程序头表信息:
[root@localhost test]$ readelf -l main
Elf file type is EXEC (Executable file)
Entry point 0x8048580
There are 8 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x00100 0x00100 R E 0x4 INTERP 0x000134 0x08048134 0x08048134 0x00013 0x00013 R 0x1 Requesting program interpreter: /lib/[ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x00970 0x00970 R E 0x1000 LOAD 0x000970 0x08049970 0x08049970 0x00130 0x001c8 RW 0x1000 DYNAMIC 0x000988 0x08049988 0x08049988 0x000e0 0x000e0 RW 0x4 NOTE 0x000148 0x08048148 0x08048148 0x00020 0x00020 R 0x4 GNU_EH_FRAME 0x000820 0x08048820 0x08048820 0x00044 0x00044 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame 03 .ctors .dtors .jcr .dynamic .got .got.plt .data .bss 04 .dynamic 05 .note.ABI-tag 06 .eh_frame_hdr 07
这里,含调试信息的"main.debug"和不含调试信息的"main"其内容是一样的。
**查看目标文件的elf文件程序头表信息: **
[root@localhost test]$ readelf -l myfile.o
There are no program headers in this file.
这里可知,可重定位的目标文件,它没程序头表。
查看静态库文件的elf文件程序头表信息:
[root@localhost test]$ readelf -l libmy.a
File: libmy.a(myfile.o)
There are no program headers in this file.
这里可知,可重定位的静态库文件,它没程序头表。
查看动态库文件的elf文件程序头表信息:
[root@localhost test]$ readelf -l libmy.so
Elf file type is DYN (Shared object file)
Entry point 0x550
There are 5 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x00000000 0x00000000 0x007f4 0x007f4 R E 0x1000 LOAD 0x0007f4 0x000017f4 0x000017f4 0x0011c 0x00128 RW 0x1000 DYNAMIC 0x000810 0x00001810 0x00001810 0x000e0 0x000e0 RW 0x4 GNU_EH_FRAME 0x000738 0x00000738 0x00000738 0x0002c 0x0002c R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Section to Segment mapping: Segment Sections... 00 .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame 01 .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .bss 02 .dynamic 03 .eh_frame_hdr 04
这里可知,做为共享目标文件的动态库,它程序头表。
查看一个可执行的elf文件的节信息:
[root@localhost test]$ readelf -S main
There are 29 section headers, starting at offset 0xca0:
Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .interp PROGBITS 08048134 000134 000013 00 A 0 0 1 [ 2] .note.ABI-tag NOTE 08048148 000148 000020 00 A 0 0 4 [ 3] .gnu.hash GNU_HASH 08048168 000168 000030 04 A 4 0 4 [ 4] .dynsym DYNSYM 08048198 000198 0000d0 10 A 5 1 4 [ 5] .dynstr STRTAB 08048268 000268 000183 00 A 0 0 1 [ 6] .gnu.version VERSYM 080483ec 0003ec 00001a 02 A 4 0 2 [ 7] .gnu.version_r VERNEED 08048408 000408 000060 00 A 5 2 4 [ 8] .rel.dyn REL 08048468 000468 000010 08 A 4 0 4 [ 9] .rel.plt REL 08048478 000478 000048 08 A 4 11 4 [10] .init PROGBITS 080484c0 0004c0 000017 00 AX 0 0 4 [11] .plt PROGBITS 080484d8 0004d8 0000a0 04 AX 0 0 4 [12] .text PROGBITS 08048580 000580 000268 00 AX 0 0 16 [13] .fini PROGBITS 080487e8 0007e8 00001c 00 AX 0 0 4 [14] .rodata PROGBITS 08048804 000804 00001a 00 A 0 0 4 [15] .eh_frame_hdr PROGBITS 08048820 000820 000044 00 A 0 0 4 [16] .eh_frame PROGBITS 08048864 000864 00010c 00 A 0 0 4 [17] .ctors PROGBITS 08049970 000970 00000c 00 WA 0 0 4 [18] .dtors PROGBITS 0804997c 00097c 000008 00 WA 0 0 4 [19] .jcr PROGBITS 08049984 000984 000004 00 WA 0 0 4 [20] .dynamic DYNAMIC 08049988 000988 0000e0 08 WA 5 0 4 [21] .got PROGBITS 08049a68 000a68 000004 04 WA 0 0 4 [22] .got.plt PROGBITS 08049a6c 000a6c 000030 04 WA 0 0 4 [23] .data PROGBITS 08049a9c 000a9c 000004 00 WA 0 0 4 [24] .bss NOBITS 08049aa0 000aa0 000098 00 WA 0 0 8 [25] .comment PROGBITS 00000000 000aa0 000114 00 0 0 1 [26] .shstrtab STRTAB 00000000 000bb4 0000e9 00 0 0 1 [27] .symtab SYMTAB 00000000 001128 000510 10 28 53 4 [28] .strtab STRTAB 00000000 001638 0003f4 00 0 0 1
Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific)
这里,main是可执行文件,不含调试信息。
查看一个包含调试信息的可执行的elf文件的节信息:
[root@localhost test]$ readelf -S main.debug
There are 37 section headers, starting at offset 0x88c8: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .interp PROGBITS 08048134 000134 000013 00 A 0 0 1 [ 2] .note.ABI-tag NOTE 08048148 000148 000020 00 A 0 0 4 [ 3] .gnu.hash GNU_HASH 08048168 000168 000030 04 A 4 0 4 [ 4] .dynsym DYNSYM 08048198 000198 0000d0 10 A 5 1 4 [ 5] .dynstr STRTAB 08048268 000268 000183 00 A 0 0 1 [ 6] .gnu.version VERSYM 080483ec 0003ec 00001a 02 A 4 0 2 [ 7] .gnu.version_r VERNEED 08048408 000408 000060 00 A 5 2 4 [ 8] .rel.dyn REL 08048468 000468 000010 08 A 4 0 4 [ 9] .rel.plt REL 08048478 000478 000048 08 A 4 11 4 [10] .init PROGBITS 080484c0 0004c0 000017 00 AX 0 0 4 [11] .plt PROGBITS 080484d8 0004d8 0000a0 04 AX 0 0 4 [12] .text PROGBITS 08048580 000580 000268 00 AX 0 0 16 [13] .fini PROGBITS 080487e8 0007e8 00001c 00 AX 0 0 4 [14] .rodata PROGBITS 08048804 000804 00001a 00 A 0 0 4 [15] .eh_frame_hdr PROGBITS 08048820 000820 000044 00 A 0 0 4 [16] .eh_frame PROGBITS 08048864 000864 00010c 00 A 0 0 4 [17] .ctors PROGBITS 08049970 000970 00000c 00 WA 0 0 4 [18] .dtors PROGBITS 0804997c 00097c 000008 00 WA 0 0 4 [19] .jcr PROGBITS 08049984 000984 000004 00 WA 0 0 4 [20] .dynamic DYNAMIC 08049988 000988 0000e0 08 WA 5 0 4 [21] .got PROGBITS 08049a68 000a68 000004 04 WA 0 0 4 [22] .got.plt PROGBITS 08049a6c 000a6c 000030 04 WA 0 0 4 [23] .data PROGBITS 08049a9c 000a9c 000004 00 WA 0 0 4 [24] .bss NOBITS 08049aa0 000aa0 000098 00 WA 0 0 8 [25] .comment PROGBITS 00000000 000aa0 000114 00 0 0 1 [26] .debug_aranges PROGBITS 00000000 000bb4 000020 00 0 0 1 [27] .debug_pubnames PROGBITS 00000000 000bd4 000028 00 0 0 1 [28] .debug_info PROGBITS 00000000 000bfc 0067aa 00 0 0 1 [29] .debug_abbrev PROGBITS 00000000 0073a6 000726 00 0 0 1 [30] .debug_line PROGBITS 00000000 007acc 0003e1 00 0 0 1 [31] .debug_frame PROGBITS 00000000 007eb0 00009c 00 0 0 4 [32] .debug_str PROGBITS 00000000 007f4c 000735 00 0 0 1 [33] .debug_loc PROGBITS 00000000 008681 0000f3 00 0 0 1 [34] .shstrtab STRTAB 00000000 008774 000151 00 0 0 1 [35] .symtab SYMTAB 00000000 008e90 000590 10 36 61 4 [36] .strtab STRTAB 00000000 009420 0003f4 00 0 0 1
Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific)
可见,相对非调试版本的可执行文件,多了".debug*"段的信息。
查看一个目标文件的elf文件的节信息:
[root@localhost test]$ readelf -S myfile.o
There are 15 section headers, starting at offset 0x204: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 00000000 000034 00009e 00 AX 0 0 4 [ 2] .rel.text REL 00000000 000744 000060 08 13 1 4 [ 3] .data PROGBITS 00000000 0000d4 000000 00 WA 0 0 4 [ 4] .bss NOBITS 00000000 0000d4 000001 00 WA 0 0 4 [ 5] .ctors PROGBITS 00000000 0000d4 000004 00 WA 0 0 4 [ 6] .rel.ctors REL 00000000 0007a4 000008 08 13 5 4 [ 7] .rodata PROGBITS 00000000 0000d8 000006 00 A 0 0 1 [ 8] .eh_frame PROGBITS 00000000 0000e0 00008c 00 A 0 0 4 [ 9] .rel.eh_frame REL 00000000 0007ac 000028 08 13 8 4 [10] .comment PROGBITS 00000000 00016c 00002e 00 0 0 1 [11] .note.GNU-stack PROGBITS 00000000 00019a 000000 00 0 0 1 [12] .shstrtab STRTAB 00000000 00019a 00006a 00 0 0 1 [13] .symtab SYMTAB 00000000 00045c 000180 10 14 14 4 [14] .strtab STRTAB 00000000 0005dc 000166 00 0 0 1
Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) ```shell**查看一个静态库文件的elf文件的节信息:** ```shell
[root@localhost test]$ readelf -S libmy.a
File: libmy.a(myfile.o)
There are 15 section headers, starting at offset 0x204: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 00000000 000034 00009e 00 AX 0 0 4 [ 2] .rel.text REL 00000000 000744 000060 08 13 1 4 [ 3] .data PROGBITS 00000000 0000d4 000000 00 WA 0 0 4 [ 4] .bss NOBITS 00000000 0000d4 000001 00 WA 0 0 4 [ 5] .ctors PROGBITS 00000000 0000d4 000004 00 WA 0 0 4 [ 6] .rel.ctors REL 00000000 0007a4 000008 08 13 5 4 [ 7] .rodata PROGBITS 00000000 0000d8 000006 00 A 0 0 1 [ 8] .eh_frame PROGBITS 00000000 0000e0 00008c 00 A 0 0 4 [ 9] .rel.eh_frame REL 00000000 0007ac 000028 08 13 8 4 [10] .comment PROGBITS 00000000 00016c 00002e 00 0 0 1 [11] .note.GNU-stack PROGBITS 00000000 00019a 000000 00 0 0 1 [12] .shstrtab STRTAB 00000000 00019a 00006a 00 0 0 1 [13] .symtab SYMTAB 00000000 00045c 000180 10 14 14 4 [14] .strtab STRTAB 00000000 0005dc 000166 00 0 0 1
Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific)
查看一个动态库文件的elf文件的节信息:
[root@localhost test]$ readelf -S libmy.so
There are 27 section headers, starting at offset 0xad0: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .gnu.hash GNU_HASH 000000d4 0000d4 00003c 04 A 2 0 4 [ 2] .dynsym DYNSYM 00000110 000110 000120 10 A 3 1 4 [ 3] .dynstr STRTAB 00000230 000230 000199 00 A 0 0 1 [ 4] .gnu.version VERSYM 000003ca 0003ca 000024 02 A 2 0 2 [ 5] .gnu.version_r VERNEED 000003f0 0003f0 000050 00 A 3 2 4 [ 6] .rel.dyn REL 00000440 000440 0000b0 08 A 2 0 4 [ 7] .rel.plt REL 000004f0 0004f0 000010 08 A 2 9 4 [ 8] .init PROGBITS 00000500 000500 000017 00 AX 0 0 4 [ 9] .plt PROGBITS 00000518 000518 000030 04 AX 0 0 4 [10] .text PROGBITS 00000550 000550 0001c4 00 AX 0 0 16 [11] .fini PROGBITS 00000714 000714 00001c 00 AX 0 0 4 [12] .rodata PROGBITS 00000730 000730 000006 00 A 0 0 1 [13] .eh_frame_hdr PROGBITS 00000738 000738 00002c 00 A 0 0 4 [14] .eh_frame PROGBITS 00000764 000764 000090 00 A 0 0 4 [15] .ctors PROGBITS 000017f4 0007f4 00000c 00 WA 0 0 4 [16] .dtors PROGBITS 00001800 000800 000008 00 WA 0 0 4 [17] .jcr PROGBITS 00001808 000808 000004 00 WA 0 0 4 [18] .data.rel.ro PROGBITS 0000180c 00080c 000004 00 WA 0 0 4 [19] .dynamic DYNAMIC 00001810 000810 0000e0 08 WA 3 0 4 [20] .got PROGBITS 000018f0 0008f0 00000c 04 WA 0 0 4 [21] .got.plt PROGBITS 000018fc 0008fc 000014 04 WA 0 0 4 [22] .bss NOBITS 00001910 000910 00000c 00 WA 0 0 4 [23] .comment PROGBITS 00000000 000910 0000e6 00 0 0 1 [24] .shstrtab STRTAB 00000000 0009f6 0000da 00 0 0 1 [25] .symtab SYMTAB 00000000 000f08 000410 10 26 48 4 [26] .strtab STRTAB 00000000 001318 000333 00 0 0 1
Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific)
相关文章:

linux中readelf命令详解
readelf 用于显示elf格式文件的信息 补充说明 readelf命令 用来显示一个或者多个elf格式的目标文件的信息,可以通过它的选项来控制显示哪些信息。这里的elf-file(s)就表示那些被检查的文件。可以支持32位,64位的elf格式文件,也支持包含elf…...

Python 教程之标准库概览
概要 Python 标准库非常庞大,所提供的组件涉及范围十分广泛,使用标准库我们可以让您轻松地完成各种任务。 以下是一些 Python3 标准库中的模块: 「os 模块」 os 模块提供了许多与操作系统交互的函数,例如创建、移动和删除文件和…...

MySQL~数据库的基本概念
一、数据库的基本概念 1、数据库的英文单词: DataBase 【 DB】 2、什么数据库? 用于存储和管理数据的仓库。 3、数据库的特点: 持久化存储数据的 数据库就是一个文件系统 方便存储和管理数据 使用统一的方式操作数据库 -- SQL 4、常…...

uniapp文件下载
使用uniapp提供给我们的uni.downloadFile、uni.saveFile和uni.openDocument三个API就可以了 也很简单,直接贴一下代码,安修修改一下即可 <template><view><image tap"pdfDownLoad" style"width: 35rpx;height: 35rpx;&…...

让GPT人工智能变身常用工具-下
...

el-table 表格头部合并
<el-table v-loading"listLoading" :key"tableKey" :data"list" stripe border fit highlight-current-rowstyle"width: 100%;" size"mini"><el-table-column label"第一行" align"center">…...

【机器学习】Linear Regression
Model Representation 1、问题描述2、表示说明3、数据绘图4、模型函数5、预测总结附录 1、问题描述 一套 1000 平方英尺 (sqft) 的房屋售价为300,000美元,一套 2000 平方英尺的房屋售价为500,000美元。这两点将构成我们的数据或训练集。面积单位为 1000 平方英尺&a…...

STM32 中断优先级管理(二)
NVIC中断管理相关函数主要在HAL库关键文件stm32f1xx_hal_cortex.c中定义。 中断优先级分组函数 void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup);这个函数的作用是对中断的优先级进行分组,这个函数在系统中只需要被调用一次。 void HAL_NVIC_SetPrio…...

17-汽水瓶
题目 某商店规定:三个空汽水瓶可以换一瓶汽水,允许向老板借空汽水瓶(但是必须要归还)。 小张手上有n个空汽水瓶,她想知道自己最多可以喝到多少瓶汽水。 数据范围:输入的正整数满足 1≤n≤100 注意&…...

Mindar.JS——实现AR图像追踪插入图片或视频
Mindar.JS使用方式 注意:此篇文章需要启动https才可调用相机权限 图像追踪示例 需要用到两个js库 <script src"./js/aframe.min.js"></script><script src"./js/mindar-image-aframe.prod.js"></script>下面看一下标签…...

JVM源码剖析之JIT工作流程
版本信息: jdk版本:jdk8u40思想至上 Hotspot中执行引擎分为解释器、JIT及时编译器,上篇文章描述到解释器过度到JIT的条件。JVM源码剖析之达到什么条件进行JIT优化 这篇文章大致讲述JIT的编译过程。在JDK中javac和JIT两部分跟编译原理挂钩&a…...

【投资笔记】(23/7/31)下半年消费复苏的机会来了?
本文为本人投资逻辑验证,不作为任何建议; 政策面 汽车:(一)优化汽车购买使用管理(二)扩大新能源汽车消费,重点在于新能源汽车;房地产:(三&#x…...

MySQL二进制日志(binlog)配置、二进制日志binlog查看、mysqlbinlog查看二进制日志、二进制日志binlog清理等详解
提示:MySQL 中的日志比较重要的有 binlog(归档日志)、redo log(重做日志)以及 undo log,那么跟我们本文相关的主要是 binlog,另外两个日志松哥将来有空了再和大家详细介绍。 文章目录 1、二进制…...

Python内存管理解析:高效利用资源的关键
推荐阅读 AI文本 OCR识别最佳实践 AI Gamma一键生成PPT工具直达链接 玩转cloud Studio 在线编码神器 玩转 GPU AI绘画、AI讲话、翻译,GPU点亮AI想象空间 引言 在当今互联网时代,Python已经成为最受欢迎的编程语言之一。它的简洁、灵活和强大的生态系统使其成为…...

解决Debian10乱码以及远程连接ssh的问题
文章目录 解决Debian10乱码Debian10配置ssh 解决Debian10乱码 下载locales apt-get install locales配置语言 dpkg-reconfigure locales输入上述命令后会进入到以下页面【空格为选中,回车下一个页面】 在这个页面里我们按空格选中如图的选项,然后回…...

C# 泛型(Generic)
方法重载:方法名称相同,参数个数和参数类型不同; 优势:可以节约方法名称 劣势:方法过多 语法:public void writeContent(T t) 原理:普通的C#代码他是运行在前端进行编译,所有的类型需…...

Golang之路---02 基础语法——流程控制(if-else , switch-case , for-range , defer)
流程控制 条件语句——if-else if 条件 1 {分支 1 } else if 条件 2 {分支 2 } else if 条件 ... {分支 ... } else {分支 else }注: Golang编译器,对于 { 和 } 的位置有严格的要求,它要求 else if (或 else)和 两边…...

HTTP——HTTP报文内的HTTP信息
HTTP 通信过程包括从客户端发往服务器端的请求及从服务器端返回客户端的响应。本章就让我们来了解一下请求和响应是怎样运作的。 HTTP 一、HTTP报文二、请求报文及响应报文的结构三、编码提升传输速率1、报文主体和实体主题的差异2、压缩传输的内容编码3、分割发送的分块传输编…...

RocketMQ工作原理
文章目录 三.RocketMQ工作原理1.消息的生产消息的生产过程Queue选择算法 2.消息的存储1.commitlog文件目录与文件消息单元 2.consumequeue目录与文件索引条目 3.对文件的读写消息写入消息拉取性能提升 3.indexFile1.索引条目结构2.文件名的作用3.查询流程 4.消息的消费1.推拉消…...

Jenkins+Docker+Docker-Compose自动部署,SpringCloud架构公共包一个任务配置
前言 Jenkins和docker的安装,随便百度吧,实际场景中我们很多微服务的架构,都是有公共包,肯定是希望一个任务能够把公共包的配置加进去,一并构建,ok,直接上干货。 Jenkins 全局环境安装 pwd e…...

spring boot 2 配置上传文件大小限制
一、起因:系统页面上传一个文件超过日志提示的文件最大100M的限制,需要更改配置文件 二、经过: 1、在本地代码中找到配置文件,修改相应数值后交给运维更新生产环境配置,但是运维说生产环境没有这行配置,遂…...

Jmeter —— 录制脚本
1. 第一步:添加http代理服务器,在测试计划--》添加--》非测试元件--》http代理服务器 2. 第二步:添加线程组(这个线程组是用来放录制的脚本,不添加也可以,就直接放在代理服务器下) 测试计划--》…...

从零开始学Docker(一):Docker的安装部署
前述:本次学习与整理来至B站【Python开发_老6哥】老师分享的课程,有兴趣的小伙伴可以去加油啦,附链接 宿主机环境:RockyLinux 9 版本管理 Docker引擎主要有两个版本:企业版(EE)和社区版&#…...

【ROS 02】ROS通信机制
机器人是一种高度复杂的系统性实现,在机器人上可能集成各种传感器(雷达、摄像头、GPS...)以及运动控制实现,为了解耦合,在ROS中每一个功能点都是一个单独的进程,每一个进程都是独立运行的。更确切的讲,ROS是进程&#…...

uniapp 选择城市定位 根据城市首字母分类排序
获取城市首字母排序,按字母顺序排序 <template><view class"address-wrap" id"address"><!-- 搜索输入框-end --><template v-if"!isSearch"><!-- 城市列表-start --><view class"address-sc…...

flex盒子 center排布,有滚动条时,拖动滚动条无法完整显示内容
文章目录 问题示例代码解决问题改进后的效果 问题 最近在开发项目的过程中,发现了一个有趣的事情,与flex盒子有关,不知道算不算是一个bug,不过对于开发者来说,确实有些不方便,感兴趣的同学不妨也去试试。 …...

Workbox使用分享
一、简要介绍 1.1 什么是Workbox 官方文档原文: At this point, service workers may seem tricky. There’s lots of complex interactions that are hard to get right. Network requests! Caching strategies! Cache management! Precaching! It’s a lot to r…...

秋招算法备战第32天 | 122.买卖股票的最佳时机II、55. 跳跃游戏、45.跳跃游戏II
122. 买卖股票的最佳时机 II - 力扣(LeetCode) 通过做差可以得到利润序列,然后只要利润需求的非负数求和就可以,因为这里没有手续费,某天买入之后买出可以等价为这几天连续买入卖出 class Solution:def maxProfit(se…...

Python状态模式介绍、使用
一、Python状态模式介绍 Python状态模式(State Pattern)是一种行为型设计模式,它允许对象在不同的状态下表现不同的行为,从而避免在代码中使用多重条件语句。该模式将状态封装在独立的对象中,并根据当前状态选择不同的…...

Github-Copilot初体验-Pycharm插件的安装与测试
引言: 80%代码秒生成!AI神器Copilot大升级 最近copilot又在众多独角兽公司的合力下,取得了重大升级。GitHub Copilot发布还不到两年, 就已经为100多万的开发者,编写了46%的代码,并提高了55%的编码速度。 …...