x86平台下,目标文件(.obj)的COFF文件结构,后面再来详细介绍

Microsoft (R) COFF/PE Dumper Version 14.31.31106.2
Copyright (C) Microsoft Corporation.  All rights reserved.Dump of file SimpleSection.objFile Type: COFF OBJECTFILE HEADER VALUES14C machine (x86)6 number of sections63140677 time date stamp Sun Sep  4 09:59:19 2022260 file pointer to symbol table17 number of symbols0 size of optional header0 characteristicsSECTION HEADER #1
.drectve name0 physical address0 virtual address18 size of raw data104 file pointer to raw data (00000104 to 0000011B)0 file pointer to relocation table0 file pointer to line numbers0 number of relocations0 number of line numbers100A00 flagsInfoRemove1 byte alignRAW DATA #100000000: 20 20 20 2F 44 45 46 41 55 4C 54 4C 49 42 3A 22     /DEFAULTLIB:"00000010: 4C 49 42 43 4D 54 22 20                          LIBCMT" Linker Directives-----------------/DEFAULTLIB:LIBCMTSECTION HEADER #2
.debug$S name0 physical address0 virtual address88 size of raw data11C file pointer to raw data (0000011C to 000001A3)0 file pointer to relocation table0 file pointer to line numbers0 number of relocations0 number of line numbers
42100040 flagsInitialized DataDiscardable1 byte alignRead OnlyRAW DATA #200000000: 04 00 00 00 F1 00 00 00 7A 00 00 00 3C 00 01 11  ....?..z...<...00000010: 00 00 00 00 43 3A 5C 55 73 65 72 73 5C 41 64 6D  ....C:\Users\Adm00000020: 69 6E 69 73 74 72 61 74 6F 72 5C 44 65 73 6B 74  inistrator\Deskt00000030: 6F 70 5C 54 65 73 74 5C 53 69 6D 70 6C 65 53 65  op\Test\SimpleSe00000040: 63 74 69 6F 6E 2E 6F 62 6A 00 3A 00 3C 11 00 22  ction.obj.:.<.."00000050: 00 00 07 00 13 00 1F 00 82 79 02 00 13 00 1F 00  .........y......00000060: 82 79 02 00 4D 69 63 72 6F 73 6F 66 74 20 28 52  .y..Microsoft (R00000070: 29 20 4F 70 74 69 6D 69 7A 69 6E 67 20 43 6F 6D  ) Optimizing Com00000080: 70 69 6C 65 72 00 00 00                          piler...SECTION HEADER #3.data name0 physical address0 virtual addressC size of raw data1A4 file pointer to raw data (000001A4 to 000001AF)0 file pointer to relocation table0 file pointer to line numbers0 number of relocations0 number of line numbers
C0300040 flagsInitialized Data4 byte alignRead WriteRAW DATA #300000000: 54 00 00 00 25 64 0A 00 55 00 00 00              T...%d..U...SECTION HEADER #4
.text$mn name0 physical address0 virtual address4E size of raw data1B0 file pointer to raw data (000001B0 to 000001FD)1FE file pointer to relocation table0 file pointer to line numbers5 number of relocations0 number of line numbers
60500020 flagsCode16 byte alignExecute ReadRAW DATA #400000000: 55 8B EC 8B 45 08 50 68 00 00 00 00 E8 00 00 00  U.?E.Ph....?..00000010: 00 83 C4 08 5D C3 CC CC CC CC CC CC CC CC CC CC  ..?]锰烫烫烫烫?00000020: 55 8B EC 83 EC 08 C7 45 FC 01 00 00 00 A1 00 00  U.??荅?...?.00000030: 00 00 03 05 00 00 00 00 03 45 FC 03 45 F8 50 E8  .........E?E鳳?00000040: 00 00 00 00 83 C4 04 8B 45 FC 8B E5 5D C3        .....?.E?錧?RELOCATIONS #4Symbol    SymbolOffset    Type              Applied To         Index     Name--------  ----------------  -----------------  --------  ------00000008  DIR32                      00000000        10  $SG69250000000D  REL32                      00000000         D  _printf0000002E  DIR32                      00000000        11  ?static_var@?1??main@@9@9 (`main'::`2'::static_var)00000034  DIR32                      00000000        14  ?static_var2@?1??main@@9@9 (`main'::`2'::static_var2)00000040  REL32                      00000000         E  _func1SECTION HEADER #5.bss name0 physical address0 virtual address4 size of raw data0 file pointer to raw data0 file pointer to relocation table0 file pointer to line numbers0 number of relocations0 number of line numbers
C0300080 flagsUninitialized Data4 byte alignRead WriteSECTION HEADER #6.chks64 name0 physical address0 virtual address30 size of raw data230 file pointer to raw data (00000230 to 0000025F)0 file pointer to relocation table0 file pointer to line numbers0 number of relocations0 number of line numbersA00 flagsInfoRemove(no align specified)RAW DATA #600000000: 27 88 7E BB A5 BD F8 78 13 3C FB 1D FA 3A B5 C7  '.~互进x.<??登00000010: 54 E7 F0 7A A1 2E 3E 48 23 4C C9 8E F0 57 16 F7  T琊z?>H#L?餡.?00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................COFF SYMBOL TABLE
000 01047982 ABS    notype       Static       | @comp.id
001 80010191 ABS    notype       Static       | @feat.00
002 00000002 ABS    notype       Static       | @vol.md
003 00000000 SECT1  notype       Static       | .drectveSection length   18, #relocs    0, #linenums    0, checksum        0
005 00000000 SECT2  notype       Static       | .debug$SSection length   88, #relocs    0, #linenums    0, checksum        0
007 00000000 SECT3  notype       Static       | .dataSection length    C, #relocs    0, #linenums    0, checksum AC5AB941
009 00000000 SECT3  notype       External     | _global_init_var
00A 00000004 UNDEF  notype       External     | _global_uninit_var
00B 00000000 SECT4  notype       Static       | .text$mnSection length   4E, #relocs    5, #linenums    0, checksum CC61DB94
00D 00000000 UNDEF  notype ()    External     | _printf
00E 00000000 SECT4  notype ()    External     | _func1
00F 00000020 SECT4  notype ()    External     | _main
010 00000004 SECT3  notype       Static       | $SG6925
011 00000008 SECT3  notype       Static       | ?static_var@?1??main@@9@9 (`main'::`2'::static_var)
012 00000000 SECT5  notype       Static       | .bssSection length    4, #relocs    0, #linenums    0, checksum        0
014 00000000 SECT5  notype       Static       | ?static_var2@?1??main@@9@9 (`main'::`2'::static_var2)
015 00000000 SECT6  notype       Static       | .chks64Section length   30, #relocs    0, #linenums    0, checksum        0String Table Size = 0x5D bytesSummary4 .bss30 .chks64C .data88 .debug$S18 .drectve4E .text$mn

目标文件(.obj)的COFF文件结构相关推荐

  1. 认识目标文件的格式—— a.out COFF PE ELF

    1.目标文件的常用格式 目标文件是源代码编译后未进行链接的中间文件(Windows的 .obj 和 Linux 的 .o),与可执行文件(Windows 的 .exe 和 Linux 的 ELF)的结 ...

  2. 链接装载与库:第三章——目标文件里有什么(ELF文件结构)

    文章目录 一.ELF文件的格式 二.ELF文件是什么样的 三.挖掘SimpleSection.o 3.1 代码段 3.2 数据段和只读数据段 3.3 BSS段 3.4 其他段 3.5 自定义段 四.E ...

  3. 程序员的自我修养--链接、装载与库笔记:目标文件里有什么

    编译器编译源代码后生成的文件叫做目标文件.目标文件从结构上讲,它是已经编译后的可执行文件格式,只是还没有经过链接的过程,其中可能有些符号或有些地址还没有被调整.其实它本身就是按照可执行文件格式存储的, ...

  4. 程序员的自我修养三目标文件里有什么

    编译器编译源代码后生成的文件叫做目标文件. 目标文件从结构上讲,它是已经编译后的可执行文件格式,只是没有经过链接的过程. 3.1目标文件的格式 现在PC平台流行的是可执行文件格式,主要是win下的PE ...

  5. 《程序员的自我修养-链接-装载与库》第三章 目标文件里有什么(1)

    目录 0.引言 1.目标文件的格式 1.1 目标文件的格式及ELF文件格式的文件的分类 1.2 目标文件与可执行文件格式的小历史 2.目标文件是什么样的 2.1 程序与目标文件简介 2.2 BSS历史 ...

  6. 《程序员的自我修养》第3章---目标文件里有什么

    第3章 目标文件里有什么 3.1 目标文件的格式: 编译器编译源代码后生成的文件叫做 "目标文件". 目标文件从结构上讲,它是已经编译后的可执行文件格式,只是还没有经过链接的过程, ...

  7. 链接/装载/运行(3)-目标文件内容解析

    声明:此内容是阅读<程序员的自我修养–链接,运行与库>而整理的学习笔记. 1 范例解析 1.1代码 /* SimpleSection.c** Linux: gcc -c SimpleSec ...

  8. 目标文件里面到底有什么(1)?

    目标文件是指:编译器编译源代码后生成的文件,那么目标文件里面到底存放的是什么呢?或者说我们的源代码在经过编译以后是怎么样存储的呢? 目标文件从结构上将,它是已经编译后的可执行文件格式,只是好没有经过链 ...

  9. Linux C目标文件

    LinuxC目标文件 宗旨:技术的学习是有限的,分享的精神是无限的. 一.目标文件格式(ELF格式) 编译器编译源代码后生成的文件叫做目标文件.目标文件是已经编译后的可执行文件,只是还没有经过链接的过 ...

  10. GCC编译器原理(二)------编译原理一:目标文件

    一.目标文件 在 UNIX® 和 Linux® 中,任何事物都是文件.UNIX 和 Linux 编程实际上是编写处理各种文件的代码.系统由许多类型的文件组成,但目标文件具有一种特殊的设计,提供了灵活和 ...

最新文章

  1. linux做网卡bond,linux下设置网卡bond
  2. CentOS通过 All-in-One 模式安装 KubeSphere技巧
  3. oracle DBA 常用表和视图
  4. JavaWeb总结(六)
  5. 2006关注IT技术
  6. C#中几种换行符,不同操作系统各不相同【转】
  7. Github远程推送一直Everything up-to-date
  8. python matplotlab.pyplot.axis()函数的用法
  9. SAP UI5 应用开发教程的学习目录
  10. 这个开源数据集要在全球扩大中文NLP影响力,你也能来做贡献!
  11. ❤『面试知识集锦100篇』3.mysql篇丨mysql基础知识和面试真题,看完不收藏算我输!!
  12. ie自动获取无效_经常用浏览器自动登录忘记了密码?教你一键查看网页星号密码...
  13. JSON DATE 转换标准的一些资料(收集)
  14. 一朝不知IP事,一世妄为测试人...
  15. mysql一对多查询合并多的一方的数据。
  16. 图片版坦克大战源代码之坦克类(二)
  17. Respo 首屏 DOM 更新的方案, CSS 动画的 Demo
  18. 四 Lync Server 2013 部署指南-前端部署(2)
  19. Golang中MYSQL驱动
  20. python开发100个小程序_Python小程序100例

热门文章

  1. appium自动化测试
  2. phpstudy 自定义php,phpstudy 自定义php版本
  3. 微信公众号(服务号)申请及微信认证详细流程图解
  4. #9733;RFC标准库_目录链接
  5. 苏宁服务器修复,今天下午苏宁服务器突发宕机,官方回应:因系统升级调整
  6. 大数据时代:九个大数据应用领域
  7. R语言将 手写数据集 图片数据转为表格数据并主成分分析
  8. matlab量化股票基本面,获取数据 - MATLAB - 掘金量化
  9. [Can‘t update] xxx in xxx has no tracked branch解决办法
  10. java dvr_java – 如何设置与DVR的连接并解码数据?