C - GDB

To get all symbols

$ gcc -o0 -ggdb map.c -o map.o && ./map
$ readelf -s map.o

Symbol table '.dynsym' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterT[...]
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [...]@GLIBC_2.2.5 (2)
     3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
     4: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMC[...]
     5: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND [...]@GLIBC_2.2.5 (2)
$ objdump -s map.o

map.o:     file format elf64-x86-64

Contents of section .interp:
 02a8 2f6c6962 36342f6c 642d6c69 6e75782d  /lib64/ld-linux-
 02b8 7838362d 36342e73 6f2e3200           x86-64.so.2.    
Contents of section .note.gnu.build-id:
 02c4 04000000 14000000 03000000 474e5500  ............GNU.
 02d4 8643f195 a0ae00ce fb7603e1 5005d9bd  .C.......v..P...
 02e4 f97ce664                             .|.d            
Contents of section .note.ABI-tag:
 02e8 04000000 10000000 01000000 474e5500  ............GNU.
 02f8 00000000 03000000 02000000 00000000  ................
Contents of section .gnu.hash:
 0308 02000000 05000000 01000000 06000000  ................
 0318 00008100 00000000 05000000 00000000  ................
 0328 d165ce6d                             .e.m            
Contents of section .dynsym:
 0330 00000000 00000000 00000000 00000000  ................
 0340 00000000 00000000 38000000 20000000  ........8... ...
 0350 00000000 00000000 00000000 00000000  ................
 0360 10000000 12000000 00000000 00000000  ................
 0370 00000000 00000000 54000000 20000000  ........T... ...
 0380 00000000 00000000 00000000 00000000  ................
 0390 63000000 20000000 00000000 00000000  c... ...........
 03a0 00000000 00000000 01000000 22000000  ............"...
 03b0 00000000 00000000 00000000 00000000  ............

If we want to compile in assembly:

$ gcc -S -o map.s map.c
$ cat map.s
    .file   "map.c"
    .text
    .globl  main
    .type   main, @function
main:
.LFB6:
    .cfi_startproc
    pushq   %rbp
    .cfi_def_cfa_offset 16
    .cfi_offset 6, -16
    movq    %rsp, %rbp
    .cfi_def_cfa_register 6
    movl    $0, %eax
    popq    %rbp
    .cfi_def_cfa 7, 8
    ret
    .cfi_endproc
.LFE6:
    .size   main, .-main
    .ident  "GCC: (Debian 10.2.1-6) 10.2.1 20210110"
    .section    .note.GNU-stack,"",@progbits