diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-09-14 03:51:22 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-09-14 03:55:11 +0200 |
commit | faa99cfbe3dbac26021df620a19c3f671a0a2613 (patch) | |
tree | 7b0d15762bd72d6901898d59bb7c7fec73d6c420 /i386/i386at | |
parent | 660d90c5e0a60902e9ec94ea585c50c55a25c10c (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/i386at')
-rw-r--r-- | i386/i386at/boothdr.S | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/i386/i386at/boothdr.S b/i386/i386at/boothdr.S index 27d0405..45cd599 100644 --- a/i386/i386at/boothdr.S +++ b/i386/i386at/boothdr.S @@ -58,6 +58,23 @@ boot_entry: /* Push the boot_info pointer to be the second argument. */ pushl %ebx + /* 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) |