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

sample compile error and execute error #171

Closed
WoodsCheney opened this issue May 20, 2021 · 2 comments
Closed

sample compile error and execute error #171

WoodsCheney opened this issue May 20, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@WoodsCheney
Copy link

printf 'main() { printf("hello world\n"); }\n' >hello.c
gcc -g -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone
-fno-omit-frame-pointer -pg -mnop-mcount
-o hello.com.dbg hello.c -fuse-ld=bfd -Wl,-T,ape.lds
-include cosmopolitan.h crt.o ape.o cosmopolitan.a
objcopy -S -O binary hello.com.dbg hello.com

compile error:
printf only support ("%s", "hello world"), not support ("hello world")

execute hello.com in Linux hw64ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux, error occur, message print "run-detectors: unable to find an interpreter for ./hello.com"

@jart
Copy link
Owner

jart commented May 20, 2021

Could you try running:

sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register"

See #2

@jart jart closed this as completed May 20, 2021
@jart jart added the duplicate This issue or pull request already exists label May 20, 2021
@WoodsCheney
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants