mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 18:59:37 +00:00
Make C applications statically compiled with libthr work. Previously,
an application compiled -static with libthr would dump core in malloc(3) because the stub thread initialization routine in libc would be used instead of the libthr supplied one.
This commit is contained in:
parent
f833c84a8f
commit
4dee39fea0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115820
@ -66,6 +66,8 @@
|
||||
|
||||
#include "thr_private.h"
|
||||
|
||||
extern void _thread_init_hack(void);
|
||||
|
||||
/*
|
||||
* All weak references used within libc should be in this table.
|
||||
* This will is so that static libraries will work.
|
||||
@ -73,6 +75,8 @@
|
||||
* XXXTHR - Check this list.
|
||||
*/
|
||||
static void *references[] = {
|
||||
&_thread_init_hack,
|
||||
&_thread_init,
|
||||
&_accept,
|
||||
&_bind,
|
||||
&_close,
|
||||
@ -135,6 +139,8 @@ static void *references[] = {
|
||||
* libraries, then the actual functions will not be loaded.
|
||||
*/
|
||||
static void *libgcc_references[] = {
|
||||
&_thread_init_hack,
|
||||
&_thread_init,
|
||||
&_pthread_once,
|
||||
&_pthread_key_create,
|
||||
&_pthread_key_delete,
|
||||
|
Loading…
Reference in New Issue
Block a user