My code works, I don’t know why.

國王的耳朵是驢耳朵

Gcc Obj File Symbols

| Comments

自用

測試環境

1
2
3
4
5
6
7
8
9
10
11
12
$ lsb_release -a
No LSB modules are available.
Distributor ID:   Ubuntu
Description:  Ubuntu 18.04.2 LTS
Release:  18.04
Codename: bionic

$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

$ dpkg -l | grep libc6:amd64 
ii  libc6:amd64                                   2.27-3ubuntu1                                amd64        GNU C Library: Shared libraries

目錄

gcc 7

/usr/lib/gcc/x86_64-linux-gnu/7/crtbegin.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 b completed.7697
0000000000000000 a crtstuff.c
0000000000000000 d .data
0000000000000000 t deregister_tm_clones
0000000000000070 t __do_global_dtors_aux
0000000000000000 t __do_global_dtors_aux_fini_array_entry
0000000000000000 D __dso_handle
0000000000000000 t .fini_array
00000000000000a0 t frame_dummy
0000000000000000 t __frame_dummy_init_array_entry
0000000000000000 t .init_array
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
0000000000000000 n .note.GNU-stack
0000000000000030 t register_tm_clones
0000000000000000 t .text
                 U __TMC_END__
0000000000000000 d __TMC_LIST__
0000000000000000 d .tm_clone_table

/usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 b completed.7697
0000000000000000 a crtstuff.c
                 w __cxa_finalize
0000000000000000 d .data
0000000000000000 d .data.rel.local
0000000000000000 t deregister_tm_clones
0000000000000090 t __do_global_dtors_aux
0000000000000000 t __do_global_dtors_aux_fini_array_entry
0000000000000000 D __dso_handle
0000000000000000 t .fini_array
00000000000000d0 t frame_dummy
0000000000000000 t __frame_dummy_init_array_entry
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 t .init_array
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
0000000000000000 n .note.GNU-stack
0000000000000040 t register_tm_clones
0000000000000000 t .text
                 U __TMC_END__
0000000000000000 d __TMC_LIST__
0000000000000000 d .tm_clone_table

/usr/lib/gcc/x86_64-linux-gnu/7/crtbeginT.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 b completed.7146
0000000000000000 a crtstuff.c
0000000000000000 d .data
                 w __deregister_frame_info
0000000000000000 t deregister_tm_clones
0000000000000070 t __do_global_dtors_aux
0000000000000000 t __do_global_dtors_aux_fini_array_entry
0000000000000000 D __dso_handle
0000000000000000 r .eh_frame
0000000000000000 r __EH_FRAME_BEGIN__
0000000000000000 t .fini_array
00000000000000b0 t frame_dummy
0000000000000000 t __frame_dummy_init_array_entry
0000000000000000 t .init_array
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
0000000000000000 n .note.GNU-stack
0000000000000020 b object.7151
                 w __register_frame_info
0000000000000030 t register_tm_clones
0000000000000000 t .text
                 U __TMC_END__
0000000000000000 d __TMC_LIST__
0000000000000000 d .tm_clone_table

/usr/lib/gcc/x86_64-linux-gnu/7/crtend.o:

1
2
3
4
5
6
7
8
9
10
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 a crtstuff.c
0000000000000000 d .data
0000000000000000 r .eh_frame
0000000000000000 r __FRAME_END__
0000000000000000 n .note.GNU-stack
0000000000000000 t .text
0000000000000000 D __TMC_END__
0000000000000000 d .tm_clone_table

/usr/lib/gcc/x86_64-linux-gnu/7/crtendS.o:

1
2
3
4
5
6
7
8
9
10
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 a crtstuff.c
0000000000000000 d .data
0000000000000000 r .eh_frame
0000000000000000 r __FRAME_END__
0000000000000000 n .note.GNU-stack
0000000000000000 t .text
0000000000000000 D __TMC_END__
0000000000000000 d .tm_clone_table

/usr/lib/gcc/x86_64-linux-gnu/7/crtfastmath.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 a crtfastmath.c
0000000000000000 d .data
0000000000000000 N .debug_abbrev
0000000000000000 N .debug_aranges
0000000000000000 N .debug_info
0000000000000000 N .debug_line
0000000000000000 N .debug_loc
0000000000000000 N .debug_ranges
0000000000000000 N .debug_str
0000000000000000 r .eh_frame
0000000000000000 t .init_array
0000000000000000 n .note.GNU-stack
0000000000000000 t set_fast_math
0000000000000000 t .text
0000000000000000 t .text.startup

/usr/lib/gcc/x86_64-linux-gnu/7/crtoffloadbegin.o:

1
2
3
4
5
6
7
8
9
10
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 d .data
0000000000000000 r .gnu.offload_funcs
0000000000000000 r .gnu.offload_vars
0000000000000000 n .note.GNU-stack
0000000000000000 R __offload_func_table
0000000000000000 a offloadstuff.c
0000000000000000 R __offload_var_table
0000000000000000 t .text

/usr/lib/gcc/x86_64-linux-gnu/7/crtoffloadend.o:

1
2
3
4
5
6
7
8
9
10
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 d .data
0000000000000000 r .gnu.offload_funcs
0000000000000000 r .gnu.offload_vars
0000000000000000 n .note.GNU-stack
0000000000000000 R __offload_funcs_end
0000000000000000 a offloadstuff.c
0000000000000000 R __offload_vars_end
0000000000000000 t .text

/usr/lib/gcc/x86_64-linux-gnu/7/crtoffloadtable.o:

1
2
3
4
5
6
7
8
9
10
11
12
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 d .data
0000000000000000 n .note.GNU-stack
                 U __offload_funcs_end
                 U __offload_func_table
0000000000000000 a offloadstuff.c
0000000000000000 R __OFFLOAD_TABLE__
                 U __offload_vars_end
                 U __offload_var_table
0000000000000000 r .rodata
0000000000000000 t .text

/usr/lib/gcc/x86_64-linux-gnu/7/crtprec32.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 a crtprec.c
0000000000000000 d .data
0000000000000000 N .debug_abbrev
0000000000000000 N .debug_aranges
0000000000000000 N .debug_info
0000000000000000 N .debug_line
0000000000000000 N .debug_ranges
0000000000000000 N .debug_str
0000000000000000 r .eh_frame
0000000000000000 t .init_array
0000000000000000 n .note.GNU-stack
0000000000000000 t set_precision
0000000000000000 t .text
0000000000000000 t .text.startup

/usr/lib/gcc/x86_64-linux-gnu/7/crtprec64.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 a crtprec.c
0000000000000000 d .data
0000000000000000 N .debug_abbrev
0000000000000000 N .debug_aranges
0000000000000000 N .debug_info
0000000000000000 N .debug_line
0000000000000000 N .debug_ranges
0000000000000000 N .debug_str
0000000000000000 r .eh_frame
0000000000000000 t .init_array
0000000000000000 n .note.GNU-stack
0000000000000000 t set_precision
0000000000000000 t .text
0000000000000000 t .text.startup

/usr/lib/gcc/x86_64-linux-gnu/7/crtprec80.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 a crtprec.c
0000000000000000 d .data
0000000000000000 N .debug_abbrev
0000000000000000 N .debug_aranges
0000000000000000 N .debug_info
0000000000000000 N .debug_line
0000000000000000 N .debug_ranges
0000000000000000 N .debug_str
0000000000000000 r .eh_frame
0000000000000000 t .init_array
0000000000000000 n .note.GNU-stack
0000000000000000 t set_precision
0000000000000000 t .text
0000000000000000 t .text.startup

/usr/lib/gcc/x86_64-linux-gnu/7/libasan_preinit.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
             U __asan_init
0000000000000000 a asan_preinit.cc
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 d .data
0000000000000000 N .debug_abbrev
0000000000000000 N .debug_aranges
0000000000000000 N .debug_info
0000000000000000 N .debug_line
0000000000000000 N .debug_str
0000000000000000 D __local_asan_preinit
0000000000000000 n .note.GNU-stack
0000000000000000 d .preinit_array
0000000000000000 t .text

glibc6

/usr/lib/x86_64-linux-gnu/crt1.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 D __data_start
0000000000000000 W data_start
0000000000000030 T _dl_relocate_static_pie
0000000000000000 r .eh_frame
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 R _IO_stdin_used
                 U __libc_csu_fini
                 U __libc_csu_init
                 U __libc_start_main
                 U main
0000000000000000 r .note.ABI-tag
0000000000000000 n .note.GNU-stack
0000000000000000 r .rodata.cst4
0000000000000000 T _start
0000000000000000 t .text

/usr/lib/x86_64-linux-gnu/crti.o:

1
2
3
4
5
6
7
8
9
10
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 T _fini
0000000000000000 t .fini
                 U _GLOBAL_OFFSET_TABLE_
                 w __gmon_start__
0000000000000000 T _init
0000000000000000 t .init
0000000000000000 n .note.GNU-stack
0000000000000000 t .text

/usr/lib/x86_64-linux-gnu/crtn.o:

1
nm: /usr/lib/x86_64-linux-gnu/crtn.o: no symbols

/usr/lib/x86_64-linux-gnu/gcrt1.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
             U atexit
0000000000000000 b .bss
0000000000000000 b called.4604
0000000000000000 d .data
0000000000000000 D __data_start
0000000000000000 W data_start
0000000000000080 T _dl_relocate_static_pie
0000000000000000 r .eh_frame
             U etext
             U __GI_memcpy
             U __GI_memmove
             U __GI_memset
             U _GLOBAL_OFFSET_TABLE_
0000000000000030 T __gmon_start__
0000000000000000 R _IO_stdin_used
             U __libc_csu_fini
             U __libc_csu_init
             U __libc_start_main
             U main
             U _mcleanup
             U __monstartup
0000000000000000 r .note.ABI-tag
0000000000000000 n .note.GNU-stack
0000000000000000 r .rodata.cst4
0000000000000000 T _start
0000000000000000 t .text

/usr/lib/x86_64-linux-gnu/grcrt1.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
             U atexit
0000000000000000 b .bss
0000000000000000 b called.4604
0000000000000000 d .data
0000000000000000 D __data_start
0000000000000000 W data_start
0000000000000000 r .eh_frame
             U etext
             U _GLOBAL_OFFSET_TABLE_
0000000000000030 T __gmon_start__
0000000000000000 R _IO_stdin_used
             U __libc_csu_fini
             U __libc_csu_init
             U __libc_start_main
             U main
             U _mcleanup
             U __monstartup
0000000000000000 r .note.ABI-tag
0000000000000000 n .note.GNU-stack
0000000000000000 r .rodata.cst4
0000000000000000 T _start
0000000000000000 t .text

/usr/lib/x86_64-linux-gnu/libtsan_preinit.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
0000000000000000 b .bss
0000000000000000 n .comment
0000000000000000 d .data
0000000000000000 N .debug_abbrev
0000000000000000 N .debug_aranges
0000000000000000 N .debug_info
0000000000000000 N .debug_line
0000000000000000 N .debug_str
0000000000000000 D __local_tsan_preinit
0000000000000000 n .note.GNU-stack
0000000000000000 d .preinit_array
0000000000000000 t .text
                 U __tsan_init
0000000000000000 a tsan_preinit.cc

/usr/lib/x86_64-linux-gnu/Mcrt1.o:

1
nm: /usr/lib/x86_64-linux-gnu/Mcrt1.o: no symbols

/usr/lib/x86_64-linux-gnu/rcrt1.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 D __data_start
0000000000000000 W data_start
0000000000000000 r .eh_frame
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 R _IO_stdin_used
                 U __libc_csu_fini
                 U __libc_csu_init
                 U __libc_start_main
                 U main
0000000000000000 r .note.ABI-tag
0000000000000000 n .note.GNU-stack
0000000000000000 r .rodata.cst4
0000000000000000 T _start
0000000000000000 t .text

/usr/lib/x86_64-linux-gnu/Scrt1.o:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 D __data_start
0000000000000000 W data_start
0000000000000000 r .eh_frame
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 R _IO_stdin_used
                 U __libc_csu_fini
                 U __libc_csu_init
                 U __libc_start_main
                 U main
0000000000000000 r .note.ABI-tag
0000000000000000 n .note.GNU-stack
0000000000000000 r .rodata.cst4
0000000000000000 T _start
0000000000000000 t .text

Comments