From b2cbc828fcbff8ecf501a53ee3b5b62195913923 Mon Sep 17 00:00:00 2001 From: Amand Tihon Date: Sat, 8 Aug 2009 16:19:24 +0200 Subject: [PATCH] Renamed data/ into runtime/ --- {data => runtime}/bold_ibh-x86_64.asm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) rename {data => runtime}/bold_ibh-x86_64.asm (83%) diff --git a/data/bold_ibh-x86_64.asm b/runtime/bold_ibh-x86_64.asm similarity index 83% rename from data/bold_ibh-x86_64.asm rename to runtime/bold_ibh-x86_64.asm index 42a25b4..5395cd4 100644 --- a/data/bold_ibh-x86_64.asm +++ b/runtime/bold_ibh-x86_64.asm @@ -1,7 +1,15 @@ -; Bold - Import by hash for linux/amd64 (elf64-x86-64) -; © 2009 Amand "alrj" Tihon ; kate: syntax Intel x86 (NASM); +; Copyright (C) 2009 Amand "alrj" Tihon + +; Import by hash for linux/amd64 (elf64-x86-64) +; This file is part of bold, the Byte Optimized Linker. + +; You can redistribute this file and/or modify it under the terms of the +; GNU General Public License as published by the Free Software Foundation, +; either version 3 of the License or (at your option) any later version. + +;------------------------------------------------------------------------------ ; alrj's x86_64 version of the import by hash method by parapete, las, leblane. ; See the wonderful thread at http://www.pouet.net/topic.php?which=5392 to ; learn everything about import by hash on Linux. @@ -23,7 +31,6 @@ extern _bold__functions_pointers ; in .bss, generated by bold extern _bold__functions_count ; immediate 32 bits extern main ; must be declared when using this - %define SYS_exit 60 %define DT_HASH 4 @@ -60,15 +67,15 @@ _bold__ibh: mov al, DT_HASH ; DT_HASH == 4 cmp [rdx], rax - cmove r9, [rdx+8] + cmove r9, [rdx+8] ; r9 : pointer to the hash table inc al ; DT_STRTAB == 5 cmp [rdx], rax - cmove r10, [rdx+8] + cmove r10, [rdx+8] ; r10 : pointer to strtab inc al ; DT_SYMTAB == 6 cmp [rdx], rax - cmove r11, [rdx+8] + cmove r11, [rdx+8] ; r11 : pointer to symtab ; Next dynamic entry add rdx, 16 -- 2.39.2