From faa99cfbe3dbac26021df620a19c3f671a0a2613 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 14 Sep 2010 03:51:22 +0200 Subject: 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. --- i386/xen/xen_boothdr.S | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'i386/xen') 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) -- cgit v1.2.3