[llvm-dev] Printing Fixups

Dylan McKay via llvm-dev llvm-dev at lists.llvm.org
Sat Oct 14 14:06:07 PDT 2017


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

On Sat, Oct 14, 2017 at 8:14 PM, Malhar Thakkar via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> 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
>>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171015/f48bbf2f/attachment.html>


More information about the llvm-dev mailing list