OSDN Git Service
(root)
/
uclinux-h8
/
uClibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f50c17e
)
import the rest of the glibc start.S so PIE works
author
Mike Frysinger
<vapier@gentoo.org>
Thu, 14 Jul 2005 00:04:54 +0000
(
00:04
-0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Thu, 14 Jul 2005 00:04:54 +0000
(
00:04
-0000)
libc/sysdeps/linux/x86_64/crt1.S
patch
|
blob
|
history
diff --git
a/libc/sysdeps/linux/x86_64/crt1.S
b/libc/sysdeps/linux/x86_64/crt1.S
index
f6e76cd
..
f6c1eb1
100644
(file)
--- a/
libc/sysdeps/linux/x86_64/crt1.S
+++ b/
libc/sysdeps/linux/x86_64/crt1.S
@@
-106,6
+106,17
@@
_start:
which grow downwards). */
pushq %rsp
which grow downwards). */
pushq %rsp
+#if defined(L_Scrt1)
+ /* Give address for main() */
+ movq main@GOTPCREL(%rip), %rdi
+
+ /* setup init/fini address */
+ movq _init@GOTPCREL(%rip), %rcx
+ movq _fini@GOTPCREL(%rip), %r8
+
+ /* start the fun */
+ call __uClibc_main@PLT
+#else
/* Give address for main() */
movq $main, %rdi
/* Give address for main() */
movq $main, %rdi
@@
-113,20
+124,9
@@
_start:
movq $_init, %rcx
movq $_fini, %r8
movq $_init, %rcx
movq $_fini, %r8
-/**************
- * START TODO */
-#if defined(L_Scrt1)
- call .L0
-.L0:
- popq %rbx
- addq $_GLOBAL_OFFSET_TABLE_+[.-.L0],%rbx
-
- call *__uClibc_main@GOT(%rip)
-#else
+ /* start the fun */
call __uClibc_main
#endif
call __uClibc_main
#endif
-/* END TODO *
- ************/
hlt /* Crash if somehow `exit' does return. */
.size _start,.-_start
hlt /* Crash if somehow `exit' does return. */
.size _start,.-_start