Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # arm-linux-gnu-gcc -c -mcpu=cortex-a5 -ffreestanding -Wall -Wextra -std=c++11 -fno-exceptions -fPIC test.cpp -o test.o
- # arm-linux-gnu-objdump -r test.o
- test.o: file format elf32-littlearm
- RELOCATION RECORDS FOR [.text]:
- OFFSET TYPE VALUE
- 00000030 R_ARM_GOTPC _GLOBAL_OFFSET_TABLE_
- 00000034 R_ARM_GOT32 kernel_info
- RELOCATION RECORDS FOR [.data.rel.local]:
- OFFSET TYPE VALUE
- 00000000 R_ARM_ABS32 .rodata
- 00000004 R_ARM_ABS32 .rodata
- 00000008 R_ARM_ABS32 .rodata
- # arm-linux-gnu-objdump -S test.o
- test.o: file format elf32-littlearm
- Disassembly of section .text:
- 00000000 <_start>:
- 0: e52db004 push {fp} ; (str fp, [sp, #-4]!)
- 4: e28db000 add fp, sp, #0
- 8: e59f2020 ldr r2, [pc, #32] ; 30 <_start+0x30>
- c: e08f2002 add r2, pc, r2
- 10: e59f301c ldr r3, [pc, #28] ; 34 <_start+0x34>
- 14: e7923003 ldr r3, [r2, r3]
- 18: e5933000 ldr r3, [r3]
- 1c: e5d33000 ldrb r3, [r3]
- 20: e1a00003 mov r0, r3
- 24: e24bd000 sub sp, fp, #0
- 28: e49db004 pop {fp} ; (ldr fp, [sp], #4)
- 2c: e12fff1e bx lr
- 30: 0000001c .word 0x0000001c
- 34: 00000000 .word 0x00000000
- # arm-linux-gnu-ld -nostdlib -L/usr/lib/gcc/arm-linux-gnueabi/4.8.5 -lgcc test.o -o test
- # arm-linux-gnu-objdump -r test
- test: file format elf32-littlearm
- # arm-linux-gnu-objdump -S test
- test: file format elf32-littlearm
- Disassembly of section .text:
- 00010094 <_start>:
- 10094: e52db004 push {fp} ; (str fp, [sp, #-4]!)
- 10098: e28db000 add fp, sp, #0
- 1009c: e59f2020 ldr r2, [pc, #32] ; 100c4 <_start+0x30>
- 100a0: e08f2002 add r2, pc, r2
- 100a4: e59f301c ldr r3, [pc, #28] ; 100c8 <_start+0x34>
- 100a8: e7923003 ldr r3, [r2, r3]
- 100ac: e5933000 ldr r3, [r3]
- 100b0: e5d33000 ldrb r3, [r3]
- 100b4: e1a00003 mov r0, r3
- 100b8: e24bd000 sub sp, fp, #0
- 100bc: e49db004 pop {fp} ; (ldr fp, [sp], #4)
- 100c0: e12fff1e bx lr
- 100c4: 00010034 .word 0x00010034
- 100c8: 0000000c .word 0x0000000c
- # arm-linux-gnu-objdump -s -j.got test
- test: file format elf32-littlearm
- Contents of section .got:
- 200dc 00000000 00000000 00000000 ec000200 ................
- # arm-linux-gnu-objdump -t test
- test: file format elf32-littlearm
- SYMBOL TABLE:
- 00010094 l d .text 00000000 .text
- 000100cc l d .rodata 00000000 .rodata
- 000200dc l d .got 00000000 .got
- 000200ec l d .data 00000000 .data
- 00000000 l d .comment 00000000 .comment
- 00000000 l d .ARM.attributes 00000000 .ARM.attributes
- 00000000 l df *ABS* 00000000 test.cpp
- 00000000 l df *ABS* 00000000
- 000200dc l O .got 00000000 _GLOBAL_OFFSET_TABLE_
- 000200f8 g .data 00000000 _bss_end__
- 000200f8 g .data 00000000 __bss_start__
- 000200f8 g .data 00000000 __bss_end__
- 00010094 g F .text 00000038 _start
- 000200f8 g .data 00000000 __bss_start
- 000200ec g O .data 0000000c kernel_info
- 000200f8 g .data 00000000 __end__
- 000200f8 g .data 00000000 _edata
- 000200f8 g .data 00000000 _end
- # arm-linux-gnu-gcc -v
- Using built-in specs.
- COLLECT_GCC=arm-linux-gnu-gcc
- COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-linux-gnueabi/4.8.5/lto-wrapper
- Target: arm-linux-gnueabi
- Configured with: ../gcc-4.8.5-20150702/configure --bindir=/usr/bin --build=x86_64-redhat-linux-gnu --datadir=/usr/share --disable-decimal-float --disable-dependency-tracking --disable-gold --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-nls --disable-plugin --disable-shared --disable-silent-rules --disable-sjlj-exceptions --disable-threads --enable-checking= --enable-gnu-unique-object --enable-initfini-array --enable-languages=c,c++ --enable-linker-build-id --enable-nls --enable-obsolete --enable-targets=all --exec-prefix=/usr --host=x86_64-redhat-linux-gnu --includedir=/usr/include --infodir=/usr/share/info --libexecdir=/usr/libexec --localstatedir=/var --mandir=/usr/share/man --prefix=/usr --program-prefix=arm-linux-gnu- --sbindir=/usr/sbin --sharedstatedir=/var/lib --sysconfdir=/etc --target=arm-linux-gnueabi --with-bugurl=http://bugzilla.redhat.com/bugzilla/ --with-linker-hash-style=gnu --with-newlib --with-sysroot=/usr/arm-linux-gnu/sys-root --with-system-libunwind --with-system-zlib --without-headers --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/cloog-install
- Thread model: single
- gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
- # arm-linux-gnu-objdump -v
- GNU objdump version 2.27-9.el7.1
- Copyright (C) 2016 Free Software Foundation, Inc.
- This program is free software; you may redistribute it under the terms of
- the GNU General Public License version 3 or (at your option) any later version.
- This program has absolutely no warranty.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement