Diablo complains about missing object files (e.g. /tmp/ccNN6Z96.o). How do I fix this?

To run correctly, Diablo needs ALL the original object files and libraries the linker used to piece the executable together. There are several reasons for this, the most important being that we need the relocation information that is only present in the relocatable object files to safely transform the binary. You can save the object files by building the executable in two steps:

  • First, compile all object files:
    gcc -c hello.c
  • Second, link them all together:

    gcc -static -Wl,-Map,hello.map -o hello hello.o

Alternatively, you could compile with the -save-temps option added to gcc,
this will automatically preserve ALL intermediate files (might generate a lot of files):

gcc -save-temps -static -Wl,-Map,hello.map -o hello hello.c