Adding support for new target

Hi,

is there a cook book/doc/commit to follow that will help me add new target to bolt?
is addition, our target is 32b elf, any doc or hints what and where should be changed to support it?

Thanks,
David

Hi David,

For the new target, you will have to implement MCPlusBuilder interface for it, similar to what we have in X86MCPlusBuilder.cpp and AArch64MCPlusBuilder.cpp. Additionally, you’ll need a custom symbolizer, like X86MCSymbolizer. Some arch-specific bits are still scattered in our core libraries, but the idea is to move them under “lib/Target/”. For 32-bit ELF, you should be able to use our 64-bit RewriteInstance with minor modifications.

thanks for the replay and info.
can it handle also objects or only elf files?
if not, is it planned?

Thanks,
David

can it handle also objects or only elf files?

What do you mean by “objects”? ELF relocatable objects? BOLT is a post-link optimizer, so the short answer is “no”.