바이너리/컴파일 관련 명령어

MySprtlty·2022년 7월 13일
0

Linux Command Line

목록 보기
1/8

🏷️바이너리 관련 명령어

📌objdump

  • 🖇️cf) objdump stands for object file dump
  • 바이너리 파일 정보 출력한다.
  • 옵션
    • -S
      • stand for Source
    • -d
      • stands for disassemble
    • -b
      • 순수 Binary 출력
      • stands for binary
  • 🔍ex)
    objdump -S 실행파일

📌xxd

  • 🖇️cf) xxd stands for hexa dump
  • 실행파일 내용을 16진수로 출력
  • 🔍ex)
xxd 실행파일

📌ldd

  • 🖇️cf) ldd stands for list dynamic dependencies
  • 어떤 라이브러리를 링크하고 있는지 목록을 출력한다.
  • 🔍ex)
ldd /bin/echo

📌readelf

  • elf 형식을 읽어서 출력한다.
  • 🖇️cf) 리눅스 실행파일은 elf형식이다.
  • 옵션
    • -h
      • 🖇️cf) h stands for header
      • elf header 출력한다.
      • entry point도 볼 수 있다.
    • -S
      • 🖇️cf) S stands for Section
      • Section 정보를 출력한다.
    • -a
      • 🖇️cf) a stands for all
      • 모든 정보를 출력한다.
  • 🔍ex)
readelf -S /bin/sleep
readelf -h /bin/sleep

📌nm

  • 🖇️cf) nm stands for name
  • object file로부터 symbol list를 출력한다.
  • 🔍ex)
nm test.o
profile
2Co 4:7

0개의 댓글