Printing Fixups

Hello everyone,

I wish to print the fixups to the standard output. So, can anyone give me any pointers on how to do that?

For example, if I have the following code, at compile time, the symbol “printf” will be unresolved and hence, there should be a fixup entry for “printf”. I need to print all such unresolved symbols to the standard output.

#include <stdio.h>

int main(int argc, char *argv[]) {
printf("Hello World\n");
return 0;
}

Thank you.

Regards,
Malhar Thakkar

It is possible to do this if you use compile or convert your C file to an LLVM IR file, and then compile that with 'llc -show-encoding.

Here is an example from the AVR backend
https://github.com/llvm-mirror/llvm/blob/master/test/MC/AVR/inst-sts.s#L12