1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
* elf/Makefile (distribute): Add dl-lookupcfg.h.
	* sysdeps/ia64/Dist: New file.
This commit is contained in:
Ulrich Drepper
2000-05-05 08:07:07 +00:00
parent c0282c0642
commit c77ec56d0c
9 changed files with 42 additions and 13 deletions

View File

@ -1,5 +1,8 @@
2000-05-05 Ulrich Drepper <drepper@redhat.com> 2000-05-05 Ulrich Drepper <drepper@redhat.com>
* elf/Makefile (distribute): Add dl-lookupcfg.h.
* sysdeps/ia64/Dist: New file.
* elf/dl-load.c (_dl_map_object_from_fd): Little of computation of * elf/dl-load.c (_dl_map_object_from_fd): Little of computation of
parameter to mprotect and for variable assignments. parameter to mprotect and for variable assignments.

View File

@ -39,7 +39,7 @@ distribute := $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
dl-cache.h dl-hash.h soinit.c sofini.c ldd.bash.in \ dl-cache.h dl-hash.h soinit.c sofini.c ldd.bash.in \
genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \ genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \
dl-librecon.h interp.c sln.c dl-dst.h hp-timing.h \ dl-librecon.h interp.c sln.c dl-dst.h hp-timing.h \
do-lookup.h sprof.c gen-trusted-dirs.awk \ do-lookup.h dl-lookupcfg.h sprof.c gen-trusted-dirs.awk \
testobj1.c testobj2.c testobj3.c testobj4.c testobj5.c \ testobj1.c testobj2.c testobj3.c testobj4.c testobj5.c \
testobj6.c testobj1_1.c failobj.c \ testobj6.c testobj1_1.c failobj.c \
ldconfig.h ldconfig.c cache.c readlib.c readelflib.c \ ldconfig.h ldconfig.c cache.c readlib.c readelflib.c \

View File

@ -922,17 +922,17 @@ _dl_map_object_from_fd (const char *name, int fd, char *realname,
- MAP_BASE_ADDR (l)); - MAP_BASE_ADDR (l));
/* Remember which part of the address space this object uses. */ /* Remember which part of the address space this object uses. */
l->l_map_start = map_segment (mappref, maplength, c->prot, 0, l->l_map_start = (ElfW(Addr)) map_segment (mappref, maplength, c->prot,
c->mapoff); 0, c->mapoff);
l->l_map_end = l->l_map_start + maplength; l->l_map_end = l->l_map_start + maplength;
l->l_addr = (ElfW(Addr)) mapat - c->mapstart; l->l_addr = l->l_map_start - c->mapstart;
/* Change protection on the excess portion to disallow all access; /* Change protection on the excess portion to disallow all access;
the portions we do not remap later will be inaccessible as if the portions we do not remap later will be inaccessible as if
unallocated. Then jump into the normal segment-mapping loop to unallocated. Then jump into the normal segment-mapping loop to
handle the portion of the segment past the end of the file handle the portion of the segment past the end of the file
mapping. */ mapping. */
__mprotect ((caddr_t) l->l_map_start, __mprotect ((caddr_t) (l->l_addr + c->mapend),
loadcmds[nloadcmds - 1].allocend - c->mapend, loadcmds[nloadcmds - 1].allocend - c->mapend,
0); 0);

View File

@ -1,4 +1,14 @@
2000-04-29 Bruno Haible <clisp.cons.org> 2000-05-05 Ulrich Drepper <drepper@redhat.com>
* internals.h (struct _pthread_descr_struct): Reorganization.
Allocate room for 16 pointers at head of the structure for future
thread-local data handling. Move p_self member in this area.
* manager.c (pthread_handle_create): Adjust use of p_self.
* sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
* pthread.c (__pthread_initial_thread): Adjust initialization.
(__pthread_manager_thread): Likewise.
2000-04-29 Bruno Haible <haible@clisp.cons.org>
* join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
for eventmask larger than 1 word. for eventmask larger than 1 word.

View File

@ -124,6 +124,12 @@ typedef struct _pthread_rwlock_info {
} pthread_readlock_info; } pthread_readlock_info;
struct _pthread_descr_struct { struct _pthread_descr_struct {
union {
struct {
pthread_descr self; /* Pointer to this structure */
} data;
void *__padding[16];
} p_header;
pthread_descr p_nextlive, p_prevlive; pthread_descr p_nextlive, p_prevlive;
/* Double chaining of active threads */ /* Double chaining of active threads */
pthread_descr p_nextwaiting; /* Next element in the queue holding the thr */ pthread_descr p_nextwaiting; /* Next element in the queue holding the thr */
@ -157,7 +163,6 @@ struct _pthread_descr_struct {
int p_userstack; /* nonzero if the user provided the stack */ int p_userstack; /* nonzero if the user provided the stack */
void *p_guardaddr; /* address of guard area or NULL */ void *p_guardaddr; /* address of guard area or NULL */
size_t p_guardsize; /* size of guard area */ size_t p_guardsize; /* size of guard area */
pthread_descr p_self; /* Pointer to this structure */
int p_nr; /* Index of descriptor in __pthread_handles */ int p_nr; /* Index of descriptor in __pthread_handles */
int p_report_events; /* Nonzero if events must be reported. */ int p_report_events; /* Nonzero if events must be reported. */
td_eventbuf_t p_eventbuf; /* Data for event. */ td_eventbuf_t p_eventbuf; /* Data for event. */

View File

@ -385,7 +385,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
new_thread->p_resp = &new_thread->p_res; new_thread->p_resp = &new_thread->p_res;
new_thread->p_guardaddr = guardaddr; new_thread->p_guardaddr = guardaddr;
new_thread->p_guardsize = guardsize; new_thread->p_guardsize = guardsize;
new_thread->p_self = new_thread; new_thread->p_header.data.self = new_thread;
new_thread->p_nr = sseg; new_thread->p_nr = sseg;
/* Initialize the thread handle */ /* Initialize the thread handle */
__pthread_init_lock(&__pthread_handles[sseg].h_lock); __pthread_init_lock(&__pthread_handles[sseg].h_lock);

View File

@ -37,6 +37,11 @@
/* Descriptor of the initial thread */ /* Descriptor of the initial thread */
struct _pthread_descr_struct __pthread_initial_thread = { struct _pthread_descr_struct __pthread_initial_thread = {
{
{
&__pthread_initial_thread /* pthread_descr self */
}
},
&__pthread_initial_thread, /* pthread_descr p_nextlive */ &__pthread_initial_thread, /* pthread_descr p_nextlive */
&__pthread_initial_thread, /* pthread_descr p_prevlive */ &__pthread_initial_thread, /* pthread_descr p_prevlive */
NULL, /* pthread_descr p_nextwaiting */ NULL, /* pthread_descr p_nextwaiting */
@ -71,7 +76,6 @@ struct _pthread_descr_struct __pthread_initial_thread = {
0, /* int p_userstack */ 0, /* int p_userstack */
NULL, /* void * p_guardaddr */ NULL, /* void * p_guardaddr */
0, /* size_t p_guardsize */ 0, /* size_t p_guardsize */
&__pthread_initial_thread, /* pthread_descr p_self */
0, /* Always index 0 */ 0, /* Always index 0 */
0, /* int p_report_events */ 0, /* int p_report_events */
{{{0, }}, 0, NULL}, /* td_eventbuf_t p_eventbuf */ {{{0, }}, 0, NULL}, /* td_eventbuf_t p_eventbuf */
@ -88,6 +92,11 @@ struct _pthread_descr_struct __pthread_initial_thread = {
and the address for identification. */ and the address for identification. */
struct _pthread_descr_struct __pthread_manager_thread = { struct _pthread_descr_struct __pthread_manager_thread = {
{
{
&__pthread_manager_thread /* pthread_descr self */
}
},
NULL, /* pthread_descr p_nextlive */ NULL, /* pthread_descr p_nextlive */
NULL, /* pthread_descr p_prevlive */ NULL, /* pthread_descr p_prevlive */
NULL, /* pthread_descr p_nextwaiting */ NULL, /* pthread_descr p_nextwaiting */
@ -122,7 +131,6 @@ struct _pthread_descr_struct __pthread_manager_thread = {
0, /* int p_userstack */ 0, /* int p_userstack */
NULL, /* void * p_guardaddr */ NULL, /* void * p_guardaddr */
0, /* size_t p_guardsize */ 0, /* size_t p_guardsize */
&__pthread_manager_thread, /* pthread_descr p_self */
1, /* Always index 1 */ 1, /* Always index 1 */
0, /* int p_report_events */ 0, /* int p_report_events */
{{{0, }}, 0, NULL}, /* td_eventbuf_t p_eventbuf */ {{{0, }}, 0, NULL}, /* td_eventbuf_t p_eventbuf */
@ -369,12 +377,12 @@ static void pthread_initialize(void)
sa.sa_flags = 0; sa.sa_flags = 0;
__sigaction(__pthread_sig_restart, &sa, NULL); __sigaction(__pthread_sig_restart, &sa, NULL);
sa.sa_handler = pthread_handle_sigcancel; sa.sa_handler = pthread_handle_sigcancel;
sa.sa_flags = 0; // sa.sa_flags = 0;
__sigaction(__pthread_sig_cancel, &sa, NULL); __sigaction(__pthread_sig_cancel, &sa, NULL);
if (__pthread_sig_debug > 0) { if (__pthread_sig_debug > 0) {
sa.sa_handler = pthread_handle_sigdebug; sa.sa_handler = pthread_handle_sigdebug;
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
sa.sa_flags = 0; // sa.sa_flags = 0;
__sigaction(__pthread_sig_debug, &sa, NULL); __sigaction(__pthread_sig_debug, &sa, NULL);
} }
/* Initially, block __pthread_sig_restart. Will be unblocked on demand. */ /* Initially, block __pthread_sig_restart. Will be unblocked on demand. */

View File

@ -54,7 +54,8 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
({ \ ({ \
register pthread_descr __self; \ register pthread_descr __self; \
__asm__ ("movl %%gs:%c1,%0" : "=r" (__self) \ __asm__ ("movl %%gs:%c1,%0" : "=r" (__self) \
: "i" (offsetof (struct _pthread_descr_struct, p_self))); \ : "i" (offsetof (struct _pthread_descr_struct, \
p_header.data.self))); \
__self; \ __self; \
}) })

2
sysdeps/ia64/Dist Normal file
View File

@ -0,0 +1,2 @@
dl-symaddr.c
dl-fptr.c