radare2/man/rarc2.1
pancake 3c7610bd9f * Some enhacements for rarc2.
- Add -s flag to use att syntax instead of intel one
  - Flag -A is the new -a (show selected arch)
  - Some more work on the arm code generation backend
  - Simplify some code (-58LOC)
  - Finish manpage rarc2(1)
2010-06-29 16:50:15 +02:00

73 lines
1.4 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 rabin2(1) ,
.Xr radiff2(1) ,
.Xr rasm2(1) ,
.Xr rax2(1) ,
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.Pp