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. 不常见但很有用的chrome调试工具使用方法
  2. java课程设计 成绩_java课程设计 学生成绩管理
  3. 启明云端分享|sigmastar ssd201\ssd202d 双网口开发板在ISP烧录UBOOT时常遇到的问题解答
  4. Android studio 关于SQlite数据库导出,创建数据库、表以及如何查看操作
  5. 怎么看服务器上jdk安装位置,查看云服务器jdk安装路径
  6. python3导入模块原理_Python模块导入机制与规范
  7. 最简单的目标跟踪(模版匹配)
  8. mqdf matlab,mexopenCV的配置学习过程
  9. 【总结一下|LaTex语法】一些常用的LaTex语法小知识
  10. linux升级libpng,在Linux中安装libpng-dev以解决pngquant构建失败的问题
  11. 计算机4F,电脑检测卡显示4f
  12. Python实现简单的层次聚类算法以及可视化
  13. 维基百科数据导入mysql数据库并进行检索操作
  14. Java *1.11(人口估算)美国人口调查局基于以下假设进行人口估算:
  15. 如何获取淘宝商品类目信息,通过商品ID获取商品类目?
  16. unity3D期末作业-太空飞机射击游戏
  17. java -- 随机获取字母或者数字
  18. matlab 带通相应,matlab butter 带通
  19. git pul的使用
  20. POJ 2240 Arbitrage 解题报告

热门文章

  1. SI24R1切换收发模式问题调试与解决
  2. 数据结构——散列表--线性探测法
  3. HTML基础(一)HTML标签
  4. Mac 上“预览”中的键盘快捷键
  5. 将长方形转换为正方形
  6. Win10系统设置开机默认开启数字小键盘
  7. matplotlib画图去掉边缘空白
  8. 人脸关键点检测 代码 matlab,从传统方法到深度学习,人脸关键点检测方法综述...
  9. 分数加减乘除混合运算带答案_分数加减乘除混合运算150道,小数加减乘除混合运算150到,整数加减乘除混合运算150道,及答案。...
  10. 新视野大学英语(第三版)读写教程4答案