gcc compile 가능한 아키텍처 목록입니다
저는 그냥 multilib 만 깔아서 사용하였습니다.
명령어
sudo apt-get install gcc-7-multilib-arm-linux-gnueabi -y;sudo apt-get install gcc-7-multilib-arm-linux-gnueabihf -y;sudo apt-get install gcc-7-multilib-mips64el-linux-gnuabi64 -y;sudo apt-get install gcc-7-multilib-mips64-linux-gnuabi64 -y;sudo apt-get install gcc-7-multilib-mipsel-linux-gnu -y;sudo apt-get install gcc-7-multilib-mips-linux-gnu -y;sudo apt-get install gcc-7-multilib-powerpc64-linux-gnu -y;sudo apt-get install gcc-7-multilib-powerpc-linux-gnu -y;sudo apt-get install gcc-7-multilib-s390x-linux-gnu -y;sudo apt-get install gcc-7-multilib-sparc64-linux-gnu -y
How to compile?
arm-linux-gnueabi-gcc-7 -o test test.c (arm 32bit binary)
mips-linux-gnu-gcc-7 -o test test.c (mips 32bit binary)
mips64-linux-gnuabi64-gcc-7 -o test test.c (mips 64bit binary)
powerpc-linux-gnu-gcc-7 -o test test.c (ppc 32bit binary)
powerpc64-linux-gnu-gcc-7 -o test test.c (ppc 64bit binary)
s390x-linux-gnu-gcc-7 -o test test.c (IBM S/390 64bit binary)
sparc64-linux-gnu-gcc-7 -o test test.c (SPARC V9 64bit binary)
How to excution?
sudo apt-get install qemu-user-static
so many :)
예를들어 32bit mips 파일이면 그냥 ./로 하면 실행안되구
qemu-mips-static -L /usr/mips-linux-gnu/ ./test
하면 실행된다 :D
'Reversing > ▷ ETC' 카테고리의 다른 글
Stack protector use Pintools (0) | 2018.07.18 |
---|---|
Peview 패치 (0) | 2018.03.31 |
Side Channel Attack using gdb (0) | 2018.02.16 |
hsdecomp error modification (0) | 2018.02.06 |
objdump 사용법 (1) | 2018.02.01 |