pancake e9d1dcb4ec * Fix make w32dist
* Update manpages
* Added r2 -H for env and files help
* Add rarun2 -h
* Show assembler/disassembler features in rasm2 -L
* Add opcode 'mov dword [ebp-12],4' to x86.nz
  - Make t/test.nz work with x86.olly (32bit only atm)
* Fix unknown os issue with tiny-pe files in r_bin
* Fix some plugin names build fails in mingw32
* MAGICPATH renamed to R_MAGIC_PATH
* Add another experimental way to generate gir files
  - Added dummy test.js for nodejs
* Build python-dist in farm

--HG--
rename : man/rarc2-tool.1 => binr/old.rarc2/rarc2-tool.1
rename : man/rarc2.1 => binr/old.rarc2/rarc2.1
2011-10-12 03:24:19 +02:00

75 lines
1.5 KiB
Groff

.Dd Jun 28, 2010
.Dt RARC2 1
.Os
.Sh NAME
.Nm rarc2
.Nd radare2 relocatable compiler
.Sh SYNOPSIS
.Nm rarc2
.Op -A
.Op -l
.Op -s
.Op -a[arch]
.Op < source
.Op > assembly
.Nm rarc2-tool
.Op -b
.Op -x
.Op -c
.Op -S
.Op file
.Sh DESCRIPTION
This command is part of the radare project.
.Pp
This compiler parses a syntax-free language similar to C and generates assembly code for various architectures.
.Pp
The benefit of using rarc2 instead of any other language is that the generated assembly code is designed to be minimal, position independent and easily injectable into processes or binaries.
.Sh OPTIONS for rarc2
.Bl -tag -width Fl
.It Fl a[arch]
Specify architecture to generate code for (x86, x64, arm)
.It Fl l
List all supported architectures
.It Fl s
Use AT&T syntax for assembly instead of the intel one
.El
.Sh OPTIONS for rarc2-tool
.Bl -tag -width Fl
.It Fl b
Dump bytes of compiled code
.It Fl x
Execute code instead
.It Fl c
Link with libc
.It Fl S
Generate .S assembly file instead of executable
.El
.Sh USAGE
.Pp
Using rarc2:
$ echo 'main@global(,64){printf("hello world\\n");}' | rarc2 -s > hello.S
$ gcc hello.S
$ ./a.out
hello world
.Pp
Using rarc2-tool:
$ cat test.r
main@global(,64){ printf("hello world\\n"); }
$ rarc2-tool -x test.r
hello world
.Sh SEE ALSO
.Pp
.Xr radare2(1) ,
.Xr rahash2(1) ,
.Xr rafind2(1) ,
.Xr ranal2(1) ,
.Xr rabin2(1) ,
.Xr radiff2(1) ,
.Xr rasm2(1) ,
.Xr rasc2(1) ,
.Xr rax2(1) ,
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>,
nibble <nibble@develsec.org>