summaryrefslogtreecommitdiff
path: root/i386/xen
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-09-14 03:51:22 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-09-14 03:55:11 +0200
commitfaa99cfbe3dbac26021df620a19c3f671a0a2613 (patch)
tree7b0d15762bd72d6901898d59bb7c7fec73d6c420 /i386/xen
parent660d90c5e0a60902e9ec94ea585c50c55a25c10c (diff)
Fix ifunc entries
* i386/ldscript: Update to the version from binutils 2.20.51.20100617. Remove SEARCH_DIR calls. * Makefile.am (clib_routines): Accept undefined __rel_iplt_start and __rel_iplt_end as these come from the ldscript. * i386/i386at/boothdr.S (boot_entry): Call ifunc hooks at boot. * i386/xen/xen_boothdr.S (start): Likewise.
Diffstat (limited to 'i386/xen')
-rw-r--r--i386/xen/xen_boothdr.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/i386/xen/xen_boothdr.S b/i386/xen/xen_boothdr.S
index 3d84e0c..604e13b 100644
--- a/i386/xen/xen_boothdr.S
+++ b/i386/xen/xen_boothdr.S
@@ -90,6 +90,23 @@ _start:
subl $KERNELBASE,%esi
pushl %esi
+ /* Fix ifunc entries */
+ movl $__rel_iplt_start,%esi
+ movl $__rel_iplt_end,%edi
+iplt_cont:
+ cmpl %edi,%esi
+ jae iplt_done
+ movl (%esi),%ebx /* r_offset */
+ movb 4(%esi),%al /* info */
+ cmpb $42,%al /* IRELATIVE */
+ jnz iplt_next
+ call *(%ebx) /* call ifunc */
+ movl %eax,(%ebx) /* fixed address */
+iplt_next:
+ addl $8,%esi
+ jmp iplt_cont
+iplt_done:
+
/* Jump into C code. */
call EXT(c_boot_entry)