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
953 B
Makefile
39 lines
953 B
Makefile
|
|
.*: file format.*
|
|
|
|
Disassembly of section .text:
|
|
|
|
00008000 <[^>]*>:
|
|
8000: 2012 movs r0, #18
|
|
8002: 2134 movs r1, #52 ; 0x34
|
|
8004: 2280 movs r2, #128 ; 0x80
|
|
8006: 2301 movs r3, #1
|
|
8008: 2401 movs r4, #1
|
|
800a: 2500 movs r5, #0
|
|
800c: 2600 movs r6, #0
|
|
800e: 2700 movs r7, #0
|
|
|
|
00008010 <[^>]*>:
|
|
8010: 2012 movs r0, #18
|
|
8012: 2100 movs r1, #0
|
|
8014: 2281 movs r2, #129 ; 0x81
|
|
8016: 2320 movs r3, #32
|
|
8018: 2700 movs r7, #0
|
|
801a: 2600 movs r6, #0
|
|
801c: 2581 movs r5, #129 ; 0x81
|
|
801e: 2422 movs r4, #34 ; 0x22
|
|
|
|
00008020 <[^>]*>:
|
|
8020: 01 .byte 0x01
|
|
|
|
00008021 <[^>]*>:
|
|
8021: 02 .byte 0x02
|
|
|
|
Disassembly of section .far:
|
|
|
|
12340000 <[^>]*>:
|
|
12340000: 2000 movs r0, #0
|
|
12340002: 2100 movs r1, #0
|
|
12340004: 2200 movs r2, #0
|
|
12340006: 2301 movs r3, #1
|