Input files

In order to successfully compact a program, Diablo needs more than just the program executable:

  • The statically linked executable. Dynamic linking is not yet supported by Diablo! Make sure to use a patched toolchain to create the executables you want to optimize with Diablo. The reasons for this requirement can be found in this FAQ item. The patches themselves (and a number of precompiled tool chains) can be obtained from the download page.
  • A linker map file. It should be called, if the program you want to compact is called executable. Diablo will look for it in the directory where it finds the executable.
    The linker map file can be created by passing the following arguments to the linker:
    ARM ADS v1.1 -map 2>
    gcc -Wl,-Map,
    GNU ld (invoked directly) -Map

  • All object files from which the executable was generated. The path to these files (a list of colon-separated directory names) can be specified with the -O command-line switch or the OBJPATH environment variable. If you want to compile source files directly into an executable, you can use gcc's --save-temps option to preserve the intermediate object files.
  • All libraries that are linked into the executable. The path to these files can be specified via the -L command-line switch or the LIBPATH environment variable. For the ADS toolchain, you should also specify the path to the C library here. This is not necessary for GCC-based toolchains.
  • If you want to use the loop invariant code motion and partial redundancy elimination features of the Diablo/ARM port, you also have to provide profile information about your program to Diablo. Specifically, you'll need a block profile file and an instruction profile file. You can pass these to Diablo using the -pb and -pi command line switches respectively.
    To gather these profiles, you have to use FIT, an instrumentation toolkit based on Diablo. The correct configuration files for FIT can be found in our downloads section.