diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 7a7bb7f..80737e8 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -40,7 +40,7 @@ CFLAGS+= -fpic CFLAGS+= -DPIC $(DEBUG) LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} -LDADD= -lc_pic -lssp_nonshared +LDADD= -lc_pic .if ${MK_SYMVER} == "yes" LIBCDIR= ${TOPSRCDIR}/lib/libc diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 4dac1c1..e081e09 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -4364,6 +4364,17 @@ __getosreldate(void) return (osreldate); } +void +exit(int status) +{ + + _exit(status); +} + +void (*__cleanup)(void); +int __isthreaded = 0; +int _thread_autoinit_dummy_decl = 1; + /* * No unresolved symbols for rtld. */ @@ -4379,6 +4390,7 @@ __stack_chk_fail(void) _rtld_error("stack overflow detected; terminated"); die(); } +__weak_reference(__stack_chk_fail, __stack_chk_fail_local); void __chk_fail(void)