So recently I've been writing programs with NASM assembly, and whenever I would add a label for some jump/loop, I noticed that objdump and gdb would treat it as a separate section, like so:
hello.o:     file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <_start>:
   0:   48 31 c0                xor    rax,rax
0000000000000003 <_start_loop>:
   3:   50                      push   rax
   4:   48 83 e0 01             and    rax,0x1
   8:   75 0c                   jne    16 <_start_nope>
   a:   68 00 00 00 00          push   0x0
   f:   e8 22 00 00 00          call   36 <print>
  14:   eb 0a                   jmp    20 <_start_check>
0000000000000016 <_start_nope>:
  16:   68 00 00 00 00          push   0x0
  1b:   e8 16 00 00 00          call   36 <print>
0000000000000020 <_start_check>:
  20:   58                      pop    rax
  21:   48 ff c0                inc    rax
  24:   48 83 f8 0a             cmp    rax,0xa
  28:   75 d9                   jne    3 <_start_loop>
  2a:   b8 3c 00 00 00          mov    eax,0x3c
  2f:   bf 00 00 00 00          mov    edi,0x0
  34:   0f 05                   syscall 
0000000000000036 <print>:
  36:   48 8b 74 24 08          mov    rsi,QWORD PTR [rsp+0x8]
  3b:   56                      push   rsi
  3c:   e8 12 00 00 00          call   53 <strlen>
  41:   48 89 c2                mov    rdx,rax
  44:   bf 01 00 00 00          mov    edi,0x1
  49:   b8 01 00 00 00          mov    eax,0x1
  4e:   0f 05                   syscall 
  50:   c2 08 00                ret    0x8
0000000000000053 <strlen>:
  53:   48 8b 5c 24 08          mov    rbx,QWORD PTR [rsp+0x8]
  58:   48 31 c0                xor    rax,rax
000000000000005b <strlen_begin>:
  5b:   8a 0c 03                mov    cl,BYTE PTR [rbx+rax*1]
  5e:   84 c9                   test   cl,cl
  60:   74 05                   je     67 <strlen_done>
  62:   48 ff c0                inc    rax
  65:   eb f4                   jmp    5b <strlen_begin>
0000000000000067 <strlen_done>:
  67:   c2 08 00                ret    0x8
I want to be able to effectively strip out labels such as _start_nope but keep the labels of functions, such as _start, print, and strlen. Is there any way I can do this?
So basically in the end I want hello.o to look like
hello.o:     file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <_start>:
   0:   48 31 c0                xor    rax,rax
   3:   50                      push   rax
   4:   48 83 e0 01             and    rax,0x1
   8:   75 0c                   jne    0x16
   a:   68 00 00 00 00          push   0x0
   f:   e8 22 00 00 00          call   0x36 <print>
  14:   eb 0a                   jmp    0x20
  16:   68 00 00 00 00          push   0x0
  1b:   e8 16 00 00 00          call   0x36 <print>
  20:   58                      pop    rax
  21:   48 ff c0                inc    rax
  24:   48 83 f8 0a             cmp    rax,0xa
  28:   75 d9                   jne    0x3
  2a:   b8 3c 00 00 00          mov    eax,0x3c
  2f:   bf 00 00 00 00          mov    edi,0x0
  34:   0f 05                   syscall 
0000000000000036 <print>:
  36:   48 8b 74 24 08          mov    rsi,QWORD PTR [rsp+0x8]
  3b:   56                      push   rsi
  3c:   e8 12 00 00 00          call   0x53 <strlen>
  41:   48 89 c2                mov    rdx,rax
  44:   bf 01 00 00 00          mov    edi,0x1
  49:   b8 01 00 00 00          mov    eax,0x1
  4e:   0f 05                   syscall 
  50:   c2 08 00                ret    0x8
0000000000000053 <strlen>:
  53:   48 8b 5c 24 08          mov    rbx,QWORD PTR [rsp+0x8]
  58:   48 31 c0                xor    rax,rax
  5b:   8a 0c 03                mov    cl,BYTE PTR [rbx+rax*1]
  5e:   84 c9                   test   cl,cl
  60:   74 05                   je     0x67
  62:   48 ff c0                inc    rax
  65:   eb f4                   jmp    0x5b
  67:   c2 08 00                ret    0x8
 
     
    