-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[JIT] Programs cannot resolve the fstat function #646
Comments
Hrm, I think this is just because libc on our systems is an archive file, and Brian, do you know of any majik that can be used to say 'link this program, but -Chris |
I think you were on the right track, but I'm pretty sure this is the linux glibc 30 zion> cat /usr/lib/libc.so I have a patch that fixes this in the simple way; i.e., just make sure that The other way to solve this would be to teach lli how to grovel through |
SHUDDER
Hrm, I was never even aware of that. :P RE: your patch, I think you should add fstat64 and friends as well. It looks I'm also concerned about making it static. It should probably just be a -Chris |
Also RE: the patch, you should add a better comment above the array, and -Chris |
Thanks for your comments on the patch. The bug should be fixed now. Final patch is here: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040308/012917.html |
For future reference here is an updated link to the final patch: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20040308/012917.html |
mlir::cir::ZeroInitConstOp was replaced with llvm.mlir.zero resolves [llvm#627](llvm/clangir#627)
mlir::cir::ZeroInitConstOp was replaced with llvm.mlir.zero resolves [llvm#627](llvm/clangir#627)
mlir::cir::ZeroInitConstOp was replaced with llvm.mlir.zero resolves [llvm#627](llvm/clangir#627)
Extended Description
Programs that use the 'fstat' function (such as GNU m4) are failing to work with
the JIT, because dlsym is apparently failing on it or something.
Here's a small testcase:
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int main() {
struct stat SB;
return fstat(1, &SB);
}
$ llvmgcc test.c -c -o - | lli
WARNING: Cannot resolve fn '__main' using a dummy noop function instead!
WARNING: Cannot resolve fn 'fstat' using a dummy noop function instead!
Note that the __main warning is expected, but the fstat one is not.
-Chris
The text was updated successfully, but these errors were encountered: