Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server ~/ateb9200/example # cat ./linuxrc.c
- int main(int arc, char **argv)
- {
- while (1);
- return 0;
- }
- server ~/ateb9200/example # cat ./stubstart.S
- .globl _start
- _start:
- BL main
- server ~/ateb9200/example # cat ./Makefile
- CC=arm-softfloat-linux-gnueabi-gcc
- CFLAGS= -static -nostdlib -O2 -Wall -pedantic -std=c89
- linuxrc: linuxrc.o
- $(CC) $(CFLAGS) stubstart.S -o linuxrc linuxrc.o
- arm-softfloat-linux-gnueabi-strip --strip-unneeded linuxrc
- linuxrc.o: linuxrc.c
- $(CC) $(CFLAGS) -c linuxrc.c
- clean:
- rm -f *.o *~ linuxrc
- server ~/ateb9200/example # make
- arm-softfloat-linux-gnueabi-gcc -static -nostdlib -O2 -Wall -pedantic -std=c89 -c linuxrc.c
- arm-softfloat-linux-gnueabi-gcc -static -nostdlib -O2 -Wall -pedantic -std=c89 stubstart.S -o linuxrc linuxrc.o
- arm-softfloat-linux-gnueabi-strip --strip-unneeded linuxrc
- server ~/ateb9200/example # ls -la ./linuxrc
- -rwxrwxrwx 1 root root 440 Jan 18 22:04 ./linuxrc
- server ~/ateb9200/example # readelf -h ./linuxrc
- ELF Header:
- Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
- Class: ELF32
- Data: 2's complement, little endian
- Version: 1 (current)
- OS/ABI: UNIX - System V
- ABI Version: 0
- Type: EXEC (Executable file)
- Machine: ARM
- Version: 0x1
- Entry point address: 0x10078
- Start of program headers: 52 (bytes into file)
- Start of section headers: 240 (bytes into file)
- Flags: 0x5000200, Version5 EABI, soft-float ABI
- Size of this header: 52 (bytes)
- Size of program headers: 32 (bytes)
- Number of program headers: 2
- Size of section headers: 40 (bytes)
- Number of section headers: 5
- Section header string table index: 4
- server ~/ateb9200/example # readelf -A ./linuxrc
- Attribute Section: aeabi
- File Attributes
- Tag_CPU_name: "5T"
- Tag_CPU_arch: v5T
- Tag_ARM_ISA_use: Yes
- Tag_THUMB_ISA_use: Thumb-1
- Tag_ABI_PCS_wchar_t: 4
- Tag_ABI_FP_denormal: Needed
- Tag_ABI_FP_exceptions: Needed
- Tag_ABI_FP_number_model: IEEE 754
- Tag_ABI_align_needed: 8-byte
- Tag_ABI_enum_size: int
- server /usr/arm-softfloat-linux-gnueabi/lib # readelf -h ./libc-2.32.so
- ELF Header:
- Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
- Class: ELF32
- Data: 2's complement, little endian
- Version: 1 (current)
- OS/ABI: UNIX - System V
- ABI Version: 0
- Type: DYN (Shared object file)
- Machine: ARM
- Version: 0x1
- Entry point address: 0x17e10
- Start of program headers: 52 (bytes into file)
- Start of section headers: 1648456 (bytes into file)
- Flags: 0x5000200, Version5 EABI, soft-float ABI
- Size of this header: 52 (bytes)
- Size of program headers: 32 (bytes)
- Number of program headers: 10
- Size of section headers: 40 (bytes)
- Number of section headers: 67
- Section header string table index: 66
- server /usr/arm-softfloat-linux-gnueabi/lib # readelf -A ./libc-2.32.so
- Attribute Section: aeabi
- File Attributes
- Tag_CPU_name: "ARM10TDMI"
- Tag_CPU_arch: v5T
- Tag_ARM_ISA_use: Yes
- Tag_THUMB_ISA_use: Thumb-1
- Tag_ABI_PCS_wchar_t: 4
- Tag_ABI_FP_rounding: Needed
- Tag_ABI_FP_denormal: Needed
- Tag_ABI_FP_exceptions: Needed
- Tag_ABI_FP_user_exceptions: Needed
- Tag_ABI_FP_number_model: IEEE 754
- Tag_ABI_align_needed: 8-byte
- Tag_ABI_align_preserved: 8-byte, except leaf SP
- Tag_ABI_enum_size: int
- Tag_ABI_optimization_goals: Aggressive Speed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement