Browse Source
Except for %eip-relative addressing, where we don't have a suitable relocation type silently wrapping at the 4G boundary, consistently force use of R_X86_64_32 (in ELF terms) instead of its sign-extending counterpart. This wasn't right in case there was no base register in the addressing expression.gdb-8.1-branch
committed by
Jan Beulich
8 changed files with 59 additions and 2 deletions
@ -0,0 +1,18 @@ |
|||
#name: 32-bit relocs w/ index but no base |
|||
#ld: --defsym APIC_BASE=0xfee00000 |
|||
#objdump: -dw |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section \.text: |
|||
|
|||
#... |
|||
[0-9a-f]+[ ]+<apic_read>: |
|||
[ ]*[0-9a-f]+:[ ]+67 8b 04 bd 00 00 e0 fe[ ]+mov[ ]+(0xfee|-0x12)00000\(,%edi,4\),%eax |
|||
[ ]*[0-9a-f]+:[ ]+c3[ ]+retq?[ ]* |
|||
#... |
|||
[0-9a-f]+[ ]+<apic_write>: |
|||
[ ]*[0-9a-f]+:[ ]+67 89 34 bd 00 00 e0 fe[ ]+mov[ ]+%esi,(0xfee|-0x12)00000\(,%edi,4\) |
|||
[ ]*[0-9a-f]+:[ ]+c3[ ]+retq?[ ]* |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
.text |
|||
.intel_syntax noprefix |
|||
.global _start |
|||
_start: |
|||
ret |
|||
|
|||
apic_read: |
|||
mov eax, [edi*4+APIC_BASE] |
|||
ret |
|||
|
|||
apic_write: |
|||
mov [edi*4+APIC_BASE], esi |
|||
ret |
|||
Loading…
Reference in new issue