mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
m68k: use PIC for Scrt1.o
This commit is contained in:
parent
e7044ea76b
commit
ed4c993944
@ -1,3 +1,7 @@
|
|||||||
|
2013-10-08 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/m68k/start.S [SHARED]: Use PIC.
|
||||||
|
|
||||||
2013-09-20 Andreas Schwab <schwab@linux-m68k.org>
|
2013-09-20 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
* sysdeps/m68k/ffs.c (__ffs): Define as hidden.
|
* sysdeps/m68k/ffs.c (__ffs): Define as hidden.
|
||||||
|
@ -52,6 +52,8 @@
|
|||||||
NULL
|
NULL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sysdep.h>
|
||||||
|
|
||||||
.text
|
.text
|
||||||
.globl _start
|
.globl _start
|
||||||
.type _start,@function
|
.type _start,@function
|
||||||
@ -74,6 +76,24 @@ _start:
|
|||||||
pea (%a1) /* Push address of the shared library
|
pea (%a1) /* Push address of the shared library
|
||||||
termination function. */
|
termination function. */
|
||||||
|
|
||||||
|
#ifdef SHARED
|
||||||
|
/* Load PIC register. */
|
||||||
|
LOAD_GOT (%a5)
|
||||||
|
|
||||||
|
/* Push the address of our own entry points to `.fini' and
|
||||||
|
`.init'. */
|
||||||
|
move.l __libc_csu_fini@GOT(%a5), -(%sp)
|
||||||
|
move.l __libc_csu_init@GOT(%a5), -(%sp)
|
||||||
|
|
||||||
|
pea (%a0) /* Push second argument: argv. */
|
||||||
|
move.l %d0, -(%sp) /* Push first argument: argc. */
|
||||||
|
|
||||||
|
move.l main@GOT(%a5), -(%sp)
|
||||||
|
|
||||||
|
/* Call the user's main function, and exit with its value. But
|
||||||
|
let the libc call main. */
|
||||||
|
jbsr __libc_start_main@PLT
|
||||||
|
#else
|
||||||
/* Push the address of our own entry points to `.fini' and
|
/* Push the address of our own entry points to `.fini' and
|
||||||
`.init'. */
|
`.init'. */
|
||||||
pea __libc_csu_fini
|
pea __libc_csu_fini
|
||||||
@ -87,6 +107,7 @@ _start:
|
|||||||
/* Call the user's main function, and exit with its value. But
|
/* Call the user's main function, and exit with its value. But
|
||||||
let the libc call main. */
|
let the libc call main. */
|
||||||
jbsr __libc_start_main
|
jbsr __libc_start_main
|
||||||
|
#endif
|
||||||
|
|
||||||
illegal /* Crash if somehow `exit' does return. */
|
illegal /* Crash if somehow `exit' does return. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user