Skip to content

Instantly share code, notes, and snippets.

@Leandros
Last active July 25, 2017 19:50
Show Gist options
  • Save Leandros/ac28c68bd98b473313ab3347e550a8a1 to your computer and use it in GitHub Desktop.
Save Leandros/ac28c68bd98b473313ab3347e550a8a1 to your computer and use it in GitHub Desktop.
$ dumpbin -symbols main.obj
Microsoft (R) COFF/PE Dumper Version 14.00.24213.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file main.obj
File Type: COFF OBJECT
COFF SYMBOL TABLE
000 01055E95 ABS notype Static | @comp.id
001 80000190 ABS notype Static | @feat.00
002 00000000 SECT1 notype Static | .drectve
Section length 62, #relocs 0, #linenums 0, checksum 0
004 00000000 SECT2 notype Static | .debug$S
Section length 6C, #relocs 0, #linenums 0, checksum 0
006 00000000 SECT3 notype Static | .rdata
Section length 3F, #relocs 0, #linenums 0, checksum BF494384
008 00000000 SECT3 notype Static | $SG4867
009 00000018 SECT3 notype Static | $SG4871
00A 00000028 SECT3 notype Static | $SG4875
00B 00000038 SECT3 notype Static | $SG4879
00C 00000000 SECT4 notype Static | .text$mn
Section length 9F, #relocs C, #linenums 0, checksum 7B1A7EB4
00E 00000000 SECT5 notype Static | .text$mn
Section length 1, #relocs 0, #linenums 0, checksum 26D930A, selection 2 (pick any)
010 00000000 SECT6 notype Static | .text$mn
Section length 8, #relocs 1, #linenums 0, checksum 411950D3, selection 2 (pick any)
012 00000000 SECT7 notype Static | .text$mn
Section length 43, #relocs 2, #linenums 0, checksum 2D481083, selection 2 (pick any)
014 00000000 SECT8 notype Static | .text$mn
Section length 5C, #relocs 3, #linenums 0, checksum E1866B31, selection 2 (pick any)
016 00000000 SECT6 notype () External | __local_stdio_printf_options
017 00000000 UNDEF notype () External | __acrt_iob_func
018 00000000 UNDEF notype () External | __stdio_common_vfprintf
019 00000000 SECT7 notype () External | _vfprintf_l
01A 00000000 SECT5 notype () External | ??$__vcrt_va_start_verify_argument_type@QEBD@@YAXXZ (void __cdecl __vcrt_va_start_verify_argument_type<char const * const>(void))
01B 00000000 SECT8 notype () External | printf
01C 00000000 SECT4 notype () Static | ?unnamed_static_foo@?A0x0667f19e@@YAXXZ (void __cdecl `anonymous namespace'::unnamed_static_foo(void))
01D 00000020 SECT4 notype () Static | ?unnamed_foo@?A0x0667f19e@@YAXXZ (void __cdecl `anonymous namespace'::unnamed_foo(void))
01E 00000040 SECT4 notype () Static | ?static_foo@@YAXXZ (void __cdecl static_foo(void))
01F 00000060 SECT4 notype () External | ?foo@@YAXXZ (void __cdecl foo(void))
020 00000080 SECT4 notype () External | main
021 00000000 SECT7 notype Label | $LN3
022 00000000 SECT8 notype Label | $LN3
023 00000060 SECT4 notype Label | $LN3
024 00000080 SECT4 notype Label | $LN3
025 00000000 SECT9 notype Static | .xdata
Section length 8, #relocs 0, #linenums 0, checksum 8D3961AC, selection 5 (pick associative Section 0x7)
027 00000000 SECT9 notype Static | $unwind$_vfprintf_l
028 00000000 SECTA notype Static | .pdata
Section length C, #relocs 3, #linenums 0, checksum A712C50E, selection 5 (pick associative Section 0x7)
02A 00000000 SECTA notype Static | $pdata$_vfprintf_l
02B 00000000 SECTB notype Static | .xdata
Section length 8, #relocs 0, #linenums 0, checksum 8D3961AC, selection 5 (pick associative Section 0x8)
02D 00000000 SECTB notype Static | $unwind$printf
02E 00000000 SECTC notype Static | .pdata
Section length C, #relocs 3, #linenums 0, checksum 289E689, selection 5 (pick associative Section 0x8)
030 00000000 SECTC notype Static | $pdata$printf
031 00000000 SECTD notype Static | .xdata
Section length 28, #relocs 0, #linenums 0, checksum EA91B9E
033 00000000 SECTD notype Static | $unwind$?unnamed_static_foo@?A0x0667f19e@@YAXXZ
034 00000000 SECTE notype Static | .pdata
Section length 3C, #relocs F, #linenums 0, checksum D7A71B67
036 00000000 SECTE notype Static | $pdata$?unnamed_static_foo@?A0x0667f19e@@YAXXZ
037 00000008 SECTD notype Static | $unwind$?unnamed_foo@?A0x0667f19e@@YAXXZ
038 0000000C SECTE notype Static | $pdata$?unnamed_foo@?A0x0667f19e@@YAXXZ
039 00000010 SECTD notype Static | $unwind$?static_foo@@YAXXZ
03A 00000018 SECTE notype Static | $pdata$?static_foo@@YAXXZ
03B 00000018 SECTD notype Static | $unwind$?foo@@YAXXZ
03C 00000024 SECTE notype Static | $pdata$?foo@@YAXXZ
03D 00000020 SECTD notype Static | $unwind$main
03E 00000030 SECTE notype Static | $pdata$main
03F 00000000 SECTF notype Static | .bss
Section length 8, #relocs 0, #linenums 0, checksum 0, selection 2 (pick any)
041 00000000 SECTF notype External | ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA (unsigned __int64 `__local_stdio_printf_options'::`2'::_OptionsStorage)
String Table Size = 0x294 bytes
Summary
8 .bss
6C .debug$S
62 .drectve
54 .pdata
3F .rdata
147 .text$mn
38 .xdata
#include <stdio.h>
namespace {
static void unnamed_static_foo(void) {
printf("unnamed_static_foo()\n");
}
void unnamed_foo(void) {
printf("unnamed_foo()\n");
}
}
static void static_foo(void) {
printf("static_foo()\n");
}
void foo(void) {
printf("foo()\n");
}
int main(void)
{
unnamed_static_foo();
unnamed_foo();
static_foo();
foo();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment