VPN termux about China.net

kali linux

1. install kali from usb. mount unetbootin

cd-rom not found dis image error : 

try {

solved

if have cd rom in laptop open it.  

else change usb slot pendrive. eject usb and reconnect to another slot )

xd }


 

2. from where can download kali?

3. install clang use cmd in root terminall

 

sudo apt install clang

$  vim test.c

o

#include<stdio.h>

int main()

{

prntf("hello clang");

return 0;

}

esc :wq

$  clang test.c


ok it's woork create webAsembly file    `wasm


$

clang --target=wasm32 --no-standard-libraries -Wl,--export-all -Wl,--no-entry -o test.wasm test.c
 
src/copy.c:2:10: fatal error: 'string.h' file not found
#include <string.h>
         ^~~~~~~~~~
1 error generated.
 $ sudo apt install git
 
$ git clone https://github.com/CraneStation/wasi-libc.git
$ cd wasi-libc
$ make install INSTALL_DIR=/tmp/wasi-libc 
 export PATH=/usr/local/opt/llvm/bin:$PATH

try: compile wasm

$

clang --target=wasm32-unknown-wasi --sysroot /tmp/wasi-libc -nostartfiles -Wl,--import-memory -Wl,--no-entry -Wl,--export-all -o test.wasm test.c
 
 wasm-ld: error: cannot open /usr/local/Cellar/llvm/9.0.0/lib/clang/9.0.0/lib/wasi/libclang_rt.builtins-wasm32.a: No such file or directory
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
from git hub download missing file.
git 
and exstract to new directory you must create ~/wasi/ folder.
try this:
Downloasd $ tar -xf libclang_rt.builtins-wasm32-wasi-16.0 -C /usr/local/Cellar/llvm/9.0.0/lib/clang/9.0.0/lib/wasi/
  let's run
$
 clang --target=wasm32-unknown-wasi --sysroot /tmp/wasi-libc -nostartfiles -Wl,--import-memory -Wl,--no-entry -Wl,--export-all -rtlib=compiler-rt -o test.wasm test.c
 
ok it's work ls view file test.wasm try view this file in this blog using script java

No comments:

Post a Comment