Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when run occurs error #4

Closed
beizishaozi opened this issue Oct 18, 2018 · 3 comments
Closed

when run occurs error #4

beizishaozi opened this issue Oct 18, 2018 · 3 comments

Comments

@beizishaozi
Copy link

Hi,
when I try to generate LLVM IR for a binary, it cause errors as follows:
anna@ubuntu:/llvm/build/llvm/bin$ gcc hello.c
anna@ubuntu:
/llvm/build/llvm/bin$ ./llvm-mctoll -d a.out
llvm-mctoll: /home/anna/llvm/src/llvm/tools/llvm-mctoll/MachineFunctionRaiser.cpp:264: bool ModuleRaiser::collectDynamicRelocations(): Assertion `(DotRelaDotPltShdr.get()->sh_info == DotGotDotPltSec.getIndex()) && ".rela.plt does not refer .got.plt section"' failed.
./llvm-mctoll[0x3088eb3]
./llvm-mctoll[0x3088f44]
./llvm-mctoll[0x3086eb1]
./llvm-mctoll[0x3088958]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7f38a07f8340]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7f389fc38f79]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f389fc3c388]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fe36)[0x7f389fc31e36]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fee2)[0x7f389fc31ee2]
./llvm-mctoll[0x499d52]
./llvm-mctoll[0x41c4bb]
./llvm-mctoll[0x40c5a2]
./llvm-mctoll[0x411d43]
./llvm-mctoll[0x412545]
./llvm-mctoll[0x426acb]
./llvm-mctoll[0x412daa]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f389fc23ec5]
./llvm-mctoll[0x407a89]
Stack dump:
0. Program arguments: ./llvm-mctoll -d a.out
Aborted (core dumped)

besides, the OS is "Linux ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux"

I don't know where is the problem. Could you give me some suggestions?
best regards

@bharadwajy
Copy link
Contributor

Thanks for trying the tool and for reporting the failure.

This failure was fixed with commit 21218e9 a couple of days ago.

Is it possible that your sources need to be updated?

Please let me know if you see the problem even with the tip of the tree.

@beizishaozi
Copy link
Author

Thanks for trying the tool and for reporting the failure.

This failure was fixed with commit 21218e9 a couple of days ago.

Is it possible that your sources need to be updated?

Please let me know if you see the problem even with the tip of the tree.

Thanks for your reply. yes, My sources is updated . however, the problem still exists.

@bharadwajy
Copy link
Contributor

bharadwajy commented Oct 19, 2018

Looking at the OS version you included, it appears that you may be running on an older Linux distro (may be Ubuntu Trusty?? 14.04??) and hence are using older compiler and binutils. llvm-mctoll has not yet been tested on that distro. Support for any codegen and/or ELF binary packaging differences needs to be added.

As noted in README.md, at present development and testing is being done using Ubuntu 18.04. It is expected that build and test would work on Ubuntu 16.04, 17.04 and 17.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants