Renamed data/ into runtime/
authorAmand Tihon <amand.tihon@alrj.org>
Sat, 8 Aug 2009 14:19:24 +0000 (16:19 +0200)
committerAmand Tihon <amand.tihon@alrj.org>
Sat, 8 Aug 2009 14:33:47 +0000 (16:33 +0200)
runtime/bold_ibh-x86_64.asm [moved from data/bold_ibh-x86_64.asm with 83% similarity]

similarity index 83%
rename from data/bold_ibh-x86_64.asm
rename to runtime/bold_ibh-x86_64.asm
index 42a25b49c27c54e951206aea7c2e46be59c1024a..5395cd440fceec25330775fcbe8a914a4611a3c6 100644 (file)
@@ -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 <amand.tihon@alrj.org>
+
+; 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