forked from jwt27/djgpp-cvs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a user part of crt0 used for dynamic linking.
- Loading branch information
Showing
9 changed files
with
57 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
AUX_CORE = 0 | ||
AUX_USER = 1 | ||
|
||
.macro call_plt | ||
movl __plt_handle, %eax | ||
movl $0, %esi # reserved | ||
lcalll *__plt_call | ||
.endm | ||
|
||
.text | ||
|
||
.global dj64_plt_call | ||
dj64_plt_call: | ||
movl $AUX_USER, %ebx | ||
call_plt | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <libc/asmdefs.h> | ||
.include "plt_defs.inc" | ||
|
||
.bss | ||
|
||
__plt_call: .quad 0 | ||
__plt_handle: .long 0 | ||
|
||
.text | ||
|
||
.global _start | ||
_start: | ||
movl 4(%esp), %eax | ||
movl %eax, __plt_call | ||
movl 8(%esp), %eax | ||
movl %eax, __plt_call + 4 | ||
movl 12(%esp), %eax | ||
movl %eax, __plt_handle | ||
ret |