Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 400 Bytes

ld-cheat-sheet.md

File metadata and controls

25 lines (22 loc) · 400 Bytes

Linker

  1. Show all supported emulations
ld -V

Example:

GNU ld (GNU Binutils) 2.39.0
  Supported emulations:
   elf_x86_64
   elf32_x86_64
   elf_i386
   elf_iamcu
   i386pep
   i386pe
   elf64bpf
  1. Specify the emulation option
ld -m elf_i386 -o <file>.o <file>.asm

Note: By default ld command always to link that into the native architecture for your machine!