mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
72d98d16ed
To support thumb1 execute-only code we need to support four new relocations (R_ARM_THM_ALU_ABS_G0_NC, R_ARM_THM_ALU_ABS_G1_NC, R_ARM_THM_ALU_ABS_G2_NC and R_ARM_THM_ALU_ABS_G3_NC). These relocations allow the static linker to finalize construction of symbol address. Typical sequence of code to get address of the symbol foo is then the following : movs r3, #:upper8_15:#foo lsls r3, #8 adds r3, #:upper0_7:#foo lsls r3, #8 adds r3, #:lower8_15:#foo lsls r3, #8 adds r3, #:lower0_7:#foo This will give following sequence of text and relocations after assembly : 4: 2300 movs r3, #0 4: R_ARM_THM_ALU_ABS_G3_NC foo 6: 021b lsls r3, r3, #8 8: 3300 adds r3, #0 8: R_ARM_THM_ALU_ABS_G2_NC foo a: 021b lsls r3, r3, #8 c: 3300 adds r3, #0 c: R_ARM_THM_ALU_ABS_G1_NC foo e: 021b lsls r3, r3, #8 10: 3300 adds r3, #0 10: R_ARM_THM_ALU_ABS_G0_NC foo
39 lines
960 B
Makefile
39 lines
960 B
Makefile
|
|
.*: file format.*
|
|
|
|
Disassembly of section .text:
|
|
|
|
00008000 <[^>]*>:
|
|
8000: 3012 adds r0, #18
|
|
8002: 3134 adds r1, #52 ; 0x34
|
|
8004: 3280 adds r2, #128 ; 0x80
|
|
8006: 3301 adds r3, #1
|
|
8008: 3401 adds r4, #1
|
|
800a: 3500 adds r5, #0
|
|
800c: 3600 adds r6, #0
|
|
800e: 3700 adds r7, #0
|
|
|
|
00008010 <[^>]*>:
|
|
8010: 3012 adds r0, #18
|
|
8012: 3100 adds r1, #0
|
|
8014: 3200 adds r2, #0
|
|
8016: 33ca adds r3, #202 ; 0xca
|
|
8018: 3700 adds r7, #0
|
|
801a: 3634 adds r6, #52 ; 0x34
|
|
801c: 3581 adds r5, #129 ; 0x81
|
|
801e: 3423 adds r4, #35 ; 0x23
|
|
|
|
00008020 <[^>]*>:
|
|
8020: 01 .byte 0x01
|
|
|
|
00008021 <[^>]*>:
|
|
8021: 02 .byte 0x02
|
|
|
|
Disassembly of section .far:
|
|
|
|
12340000 <[^>]*>:
|
|
12340000: 3000 adds r0, #0
|
|
12340002: 3100 adds r1, #0
|
|
12340004: 3200 adds r2, #0
|
|
12340006: 3301 adds r3, #1
|