LLVM bolt support for 32 bit systems

While reading about BOLT, I understand it currently supports X86-64 and AArch64 ELF binaries.

  • What is the reason for not supporting 32-bit ELFs? Are there any fundamental reasons for not supporting them?
  • Is there any ongoing work to enable this?
  • What changes are required if one has to use BOLT for 32-bit ELF?
  • What is the reason for not supporting 32-bit ELFs? Are there any fundamental reasons for not supporting them?

When we started working on BOLT, we targeted high-performance data-center applications. In 2016, all such applications that we encountered were running on 64-bit architectures.

  • Is there any ongoing work to enable this?

Not that I’m aware of.

  • What changes are required if one has to use BOLT for 32-bit ELF?

Other than adding a 32-bit RewriteInstance, on x86 you will have to recognize patterns for PIC code. It lacks rip-relative addressing introduced in amd64.

1 Like

Got it, Thanks!