首页 > 其他分享 >elf文件

elf文件

时间:2023-08-05 09:01:45浏览次数:23  
标签:文件 00 0000 elf 0800 0100 0000000000000000 0200

main.c(文件大小是100个字节)

int sum(int *a,int n);

int array[2] = {1,2};

int main()
{
    int val = sum(array,2);
    return val;
}

main.o(文件大小是1416个字节)

7f45 4c46 0201 0100 0000 0000 0000 0000
0100 3e00 0100 0000 0000 0000 0000 0000
0000 0000 0000 0000 4802 0000 0000 0000
0000 0000 4000 0000 0000 4000 0d00 0c00
f30f 1efa 4883 ec08 be02 0000 0048 8d3d
0000 0000 e800 0000 0048 83c4 08c3 0000
0100 0000 0200 0000 0047 4343 3a20 2855
6275 6e74 7520 3131 2e33 2e30 2d31 7562
756e 7475 317e 3232 2e30 3429 2031 312e
332e 3000 0000 0000 0400 0000 1000 0000
0500 0000 474e 5500 0200 00c0 0400 0000
0300 0000 0000 0000 1400 0000 0000 0000
017a 5200 0178 1001 1b0c 0708 9001 0000
1400 0000 1c00 0000 0000 0000 1e00 0000
0048 0e10 550e 0800 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0100 0000 0400 f1ff 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0300 0100
0000 0000 0000 0000 0000 0000 0000 0000
0800 0000 1200 0100 0000 0000 0000 0000
1e00 0000 0000 0000 0d00 0000 1100 0300
0000 0000 0000 0000 0800 0000 0000 0000
1300 0000 1000 0000 0000 0000 0000 0000
0000 0000 0000 0000 006d 6169 6e2e 6300
6d61 696e 0061 7272 6179 0073 756d 0000
1000 0000 0000 0000 0200 0000 0400 0000
fcff ffff ffff ffff 1500 0000 0000 0000
0400 0000 0500 0000 fcff ffff ffff ffff
2000 0000 0000 0000 0200 0000 0200 0000
0000 0000 0000 0000 002e 7379 6d74 6162
002e 7374 7274 6162 002e 7368 7374 7274
6162 002e 7265 6c61 2e74 6578 7400 2e64
6174 6100 2e62 7373 002e 636f 6d6d 656e
7400 2e6e 6f74 652e 474e 552d 7374 6163
6b00 2e6e 6f74 652e 676e 752e 7072 6f70
6572 7479 002e 7265 6c61 2e65 685f 6672
616d 6500 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 2000 0000 0100 0000
0600 0000 0000 0000 0000 0000 0000 0000
4000 0000 0000 0000 1e00 0000 0000 0000
0000 0000 0000 0000 0100 0000 0000 0000
0000 0000 0000 0000 1b00 0000 0400 0000
4000 0000 0000 0000 0000 0000 0000 0000
9001 0000 0000 0000 3000 0000 0000 0000
0a00 0000 0100 0000 0800 0000 0000 0000
1800 0000 0000 0000 2600 0000 0100 0000
0300 0000 0000 0000 0000 0000 0000 0000
6000 0000 0000 0000 0800 0000 0000 0000
0000 0000 0000 0000 0800 0000 0000 0000
0000 0000 0000 0000 2c00 0000 0800 0000
0300 0000 0000 0000 0000 0000 0000 0000
6800 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0100 0000 0000 0000
0000 0000 0000 0000 3100 0000 0100 0000
3000 0000 0000 0000 0000 0000 0000 0000
6800 0000 0000 0000 2c00 0000 0000 0000
0000 0000 0000 0000 0100 0000 0000 0000
0100 0000 0000 0000 3a00 0000 0100 0000
0000 0000 0000 0000 0000 0000 0000 0000
9400 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0100 0000 0000 0000
0000 0000 0000 0000 4a00 0000 0700 0000
0200 0000 0000 0000 0000 0000 0000 0000
9800 0000 0000 0000 2000 0000 0000 0000
0000 0000 0000 0000 0800 0000 0000 0000
0000 0000 0000 0000 6200 0000 0100 0000
0200 0000 0000 0000 0000 0000 0000 0000
b800 0000 0000 0000 3000 0000 0000 0000
0000 0000 0000 0000 0800 0000 0000 0000
0000 0000 0000 0000 5d00 0000 0400 0000
4000 0000 0000 0000 0000 0000 0000 0000
c001 0000 0000 0000 1800 0000 0000 0000
0a00 0000 0800 0000 0800 0000 0000 0000
1800 0000 0000 0000 0100 0000 0200 0000
0000 0000 0000 0000 0000 0000 0000 0000
e800 0000 0000 0000 9000 0000 0000 0000
0b00 0000 0300 0000 0800 0000 0000 0000
1800 0000 0000 0000 0900 0000 0300 0000
0000 0000 0000 0000 0000 0000 0000 0000
7801 0000 0000 0000 1700 0000 0000 0000
0000 0000 0000 0000 0100 0000 0000 0000
0000 0000 0000 0000 1100 0000 0300 0000
0000 0000 0000 0000 0000 0000 0000 0000
d801 0000 0000 0000 6c00 0000 0000 0000
0000 0000 0000 0000 0100 0000 0000 0000
0000 0000 0000 0000 

readelf -a main.o

ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          584 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           64 (bytes)
  Number of section headers:         13
  Section header string table index: 12

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .text             PROGBITS         0000000000000000  00000040
       000000000000001e  0000000000000000  AX       0     0     1
  [ 2] .rela.text        RELA             0000000000000000  00000190
       0000000000000030  0000000000000018   I      10     1     8
  [ 3] .data             PROGBITS         0000000000000000  00000060
       0000000000000008  0000000000000000  WA       0     0     8
  [ 4] .bss              NOBITS           0000000000000000  00000068
       0000000000000000  0000000000000000  WA       0     0     1
  [ 5] .comment          PROGBITS         0000000000000000  00000068
       000000000000002c  0000000000000001  MS       0     0     1
  [ 6] .note.GNU-stack   PROGBITS         0000000000000000  00000094
       0000000000000000  0000000000000000           0     0     1
  [ 7] .note.gnu.pr[...] NOTE             0000000000000000  00000098
       0000000000000020  0000000000000000   A       0     0     8
  [ 8] .eh_frame         PROGBITS         0000000000000000  000000b8
       0000000000000030  0000000000000000   A       0     0     8
  [ 9] .rela.eh_frame    RELA             0000000000000000  000001c0
       0000000000000018  0000000000000018   I      10     8     8
  [10] .symtab           SYMTAB           0000000000000000  000000e8
       0000000000000090  0000000000000018          11     3     8
  [11] .strtab           STRTAB           0000000000000000  00000178
       0000000000000017  0000000000000000           0     0     1
  [12] .shstrtab         STRTAB           0000000000000000  000001d8
       000000000000006c  0000000000000000           0     0     1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  D (mbind), l (large), p (processor specific)

There are no section groups in this file.

There are no program headers in this file.

There is no dynamic section in this file.

Relocation section '.rela.text' at offset 0x190 contains 2 entries:
  Offset          Info           Type           Sym. Value    Sym. Name + Addend
000000000010  000400000002 R_X86_64_PC32     0000000000000000 array - 4
000000000015  000500000004 R_X86_64_PLT32    0000000000000000 sum - 4

Relocation section '.rela.eh_frame' at offset 0x1c0 contains 1 entry:
  Offset          Info           Type           Sym. Value    Sym. Name + Addend
000000000020  000200000002 R_X86_64_PC32     0000000000000000 .text + 0
No processor specific unwind information to decode

Symbol table '.symtab' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS main.c
     2: 0000000000000000     0 SECTION LOCAL  DEFAULT    1 .text
     3: 0000000000000000    30 FUNC    GLOBAL DEFAULT    1 main
     4: 0000000000000000     8 OBJECT  GLOBAL DEFAULT    3 array
     5: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND sum

No version information found in this file.

Displaying notes found in: .note.gnu.property
  Owner                Data size 	Description
  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
      Properties: x86 feature: IBT, SHSTK

 

标签:文件,00,0000,elf,0800,0100,0000000000000000,0200
From: https://www.cnblogs.com/jixuxiangqian/p/17607464.html

相关文章

  • 电脑版微信聊天记录恢复导出工具(文字/语音/图片/视频/文件/表情包)
    PC版微信的聊天记录加密保存在电脑中,有时我们想将自己微信中的聊天记录导出来,但微信软件并不提供该功能。此软件可将自己电脑版微信中的聊天内容批量导出来。下载地址1:点击下载下载地址2:https://weijiesoft.lanzouw.com/i2oZq14gh19e可按照联系人名称创建文件夹自动分类,包括:文......
  • 文件及文件管理
    2.2Windows7基础2.2.1Windows7的基础知识Windows7的主要特性有: 更简单 更安全 更好的连接 更低的成本安装Windows7操作系统所需的硬件配置 Windows7系统的软件需求只是指对硬盘系统的要求。安装Windows7系统的硬盘分期必须采用NTFS结构,要确保至少有16GB的可用空间,最好......
  • 使用 MongoDB 的兄弟,有没有采用 GridFS 做分布式文件系统的?
    修改写补充说明郭理靖,京东开放平台邓涛、Kenny、李波等人赞同压力以及数据量比较大的业务不推荐使用MongoGridFS。MongoGridFS在高并发(每秒写入10M,持续半小时到一个小时)的情况下secondary会无法catchupwithprimary。MongoGridFS不是为分......
  • 对话AI--文件重名的处理方法
    新建一个文件,保存时对文件名进行检查,若重名则按照Windows系统中的方法,加数字与括号进行处理。usingSystem.IO;publicstaticstringgetUniqueFileName(stringfilePath){stringdirectory=Path.GetDirectoryName(filePath);if(!Directo......
  • 【Azure K8S|AKS】进入AKS的POD中查看文件,例如PVC Volume Mounts使用情况
    问题描述在昨天的文章中,创建了Disk+PV+PVC+POD方案(https://www.cnblogs.com/lulight/p/17604441.html),那么如何进入到POD之中去查看文件呢?如PVCVolumeMounts中文件? 问题解答第一步:进入POD内部(查看文件)使用  kubectlexec-it <yourpodname>--/bin/sh ......
  • 网页实现文件夹的上传和下载
    ​ 这里只写后端的代码,基本的思想就是,前端将文件分片,然后每次访问上传接口的时候,向后端传入参数:当前为第几块文件,和分片总数下面直接贴代码吧,一些难懂的我大部分都加上注释了:上传文件实体类:看得出来,实体类中已经有很多我们需要的功能了,还有实用的属性。如MD5秒传的信息。pub......
  • linux随笔系列6----文件系统
    文件系统q1:文件系统类型有那么多,那么linux如何管理和认知它们的呢?整个Linux认识的filesystem其实都是VFS在进行管理,我们使用者并不需要知道每个partition上头的filesystem是什么~VFS会主动的帮我们做好读取的动作。如下图所示 EXT2Ext2文件系统中所支持的......
  • Scala——文件和正则表达式
    读取文件importscala.io.Sourcevalsource=Source.fromFile(fileName,"UTF-8")//第一个参数可以是文件名或java.io.File//如果没有第二个参数将会使用当前平台缺省的字符编码vallineIterator=source.getLines//结果是一个迭代器//迭代器可以......
  • 编制招标文件的“四步法”
    招标文件是合同缔约过程的要约邀请文件,是招标人按照招标投标法及其配套规范的规定,向投标人明确招标条件、提出响应要求并以此为依据对投标人的投标文件进行评审比较、择优选用的具有法律效力的文件。 招标文件的质量,直接决定了招标投标活动的质量;招标投标活动的质量,直接决定了......
  • web实现文件夹的上传和下载
    ​  上周遇到这样一个问题,客户上传高清视频(1G以上)的时候上传失败。一开始以为是session过期或者文件大小受系统限制,导致的错误。查看了系统的配置文件没有看到文件大小限制,web.xml中seesiontimeout是30,我把它改成了120。但还是不行,有时候10分钟就崩了。同事说,可能是客户这......