[root@centos ARM]# arm-linux-as align.s -o aslign.o
align.s: Assembler messages:
align.s:3: Error: misaligned branch destination
[root@centos ARM]# arm-linux-as align.s -o aslign.o
align.s: Assembler messages:
align.s:3: Error: misaligned branch destination
[root@centos ARM]# arm-linux-as --version
GNU assembler (GNU Binutils) 2.20
_start:
b reset
nop
.byte 0xff
.align
reset:
ldr r0, =0x40000000
[root@centos ARM]# arm-linux-objdump -d aslign.o
aslign.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <_start>:
0: ea000001 b c
4: e1a00000 nop ; (mov r0, r0)
8: ff .byte 0xff
9: 00 .byte 0x00
...
0000000c :
c: e3a00101 mov r0, #1073741824 ; 0x40000000
# arm-linux-objdump -D aslign.o
aslign.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <_start>:
0: ea000001 b c
4: e1a00000 nop ; (mov r0, r0)
8: 000000ff strdeq r0, [r0], -pc
0000000c :
c: e3a00101 mov r0, #1073741824 ; 0x40000000
.balign[wl] abs-expr, abs-expr, abs-expr
[root@centos ARM]# arm-linux-objdump -d aslign2.o
aslign2.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <_start>:
0: ea000002 b 10
4: e1a00000 nop ; (mov r0, r0)
8: deadbeef cdple 14, 10, cr11, cr13, cr15, {7}
c: deadbeef cdple 14, 10, cr11, cr13, cr15, {7}
00000010 <reset>:
10: e3a00101 mov r0, #1073741824 ; 0x40000000
14: e1a00000 nop ; (mov r0, r0)
18: e1a00000 nop ; (mov r0, r0)
1c: e1a00000 nop ; (mov r0, r0)
[root@centos ARM]# arm-linux-objdump -d aslign2.o
aslign2.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <_start>:
0: ea000000 b 8
4: e1a00000 nop ; (mov r0, r0)
00000008 :
8: e3a00101 mov r0, #1073741824 ; 0x40000000
c: e1a00000 nop ; (mov r0, r0)
因为指定最大才能跳过 4 个字节来对齐,但是这个 16 字节的对齐需要填充 8 个字节,所以伪指令无效。
转载地址:http://www.groad.net/bbs/simple/?t3090.html