mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Update.
2002-08-29 Jakub Jelinek <jakub@redhat.com> * stdio-common/vfprintf.c (vfprintf): Add builtin_expect for string_malloced, it is unlikely to be set. Only call free with non-NULL workspace. * sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Use -mcpu=ultrasparc, not only tune for it. (ASFLAGS*): Set unconditionally. 2002-08-29 Jakub Jelinek <jakub@redhat.com> * sysdeps/generic/readelflib.c (process_elf_file): Make loadaddr ElfW(Addr). Don't mask upper 32-bits and lower 12 bits off from p_vaddr/p_offset when computing loadaddr.
This commit is contained in:
15
ChangeLog
15
ChangeLog
@@ -1,3 +1,18 @@
|
|||||||
|
2002-08-29 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* stdio-common/vfprintf.c (vfprintf): Add builtin_expect for
|
||||||
|
string_malloced, it is unlikely to be set.
|
||||||
|
Only call free with non-NULL workspace.
|
||||||
|
* sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Use
|
||||||
|
-mcpu=ultrasparc, not only tune for it.
|
||||||
|
(ASFLAGS*): Set unconditionally.
|
||||||
|
|
||||||
|
2002-08-29 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/generic/readelflib.c (process_elf_file): Make loadaddr
|
||||||
|
ElfW(Addr). Don't mask upper 32-bits and lower 12 bits off from
|
||||||
|
p_vaddr/p_offset when computing loadaddr.
|
||||||
|
|
||||||
2002-08-29 Ulrich Drepper <drepper@redhat.com>
|
2002-08-29 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* version.h (VERSION): Bump to 2.2.92.
|
* version.h (VERSION): Bump to 2.2.92.
|
||||||
|
@@ -1,3 +1,13 @@
|
|||||||
|
2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
|
||||||
|
|
||||||
|
* spinlock.c (__pthread_lock): Fix spurious wakeup
|
||||||
|
handling. Don't clear lowest bit of list pointer as sign the thread
|
||||||
|
is still on the wait list. Don't restart after spurious wakeup
|
||||||
|
with spinning to get the lock.
|
||||||
|
(__pthread_unlock): Take set lowest bit into account when handling
|
||||||
|
pointer to list elements.
|
||||||
|
Patch by Steve Munroe <sjmunroe@us.ibm.com>.
|
||||||
|
|
||||||
2002-08-28 Roland McGrath <roland@redhat.com>
|
2002-08-28 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
* sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
|
* sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
|
||||||
|
@@ -85,8 +85,6 @@ void internal_function __pthread_lock(struct _pthread_fastlock * lock,
|
|||||||
spurious_wakeup_count = 0;
|
spurious_wakeup_count = 0;
|
||||||
spin_count = 0;
|
spin_count = 0;
|
||||||
|
|
||||||
again:
|
|
||||||
|
|
||||||
/* On SMP, try spinning to get the lock. */
|
/* On SMP, try spinning to get the lock. */
|
||||||
|
|
||||||
if (__pthread_smp_kernel) {
|
if (__pthread_smp_kernel) {
|
||||||
@@ -114,6 +112,8 @@ again:
|
|||||||
lock->__spinlock += (spin_count - lock->__spinlock) / 8;
|
lock->__spinlock += (spin_count - lock->__spinlock) / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
again:
|
||||||
|
|
||||||
/* No luck, try once more or suspend. */
|
/* No luck, try once more or suspend. */
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -130,7 +130,7 @@ again:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (self != NULL) {
|
if (self != NULL) {
|
||||||
THREAD_SETMEM(self, p_nextlock, (pthread_descr) (oldstatus & ~1L));
|
THREAD_SETMEM(self, p_nextlock, (pthread_descr) (oldstatus));
|
||||||
/* Make sure the store in p_nextlock completes before performing
|
/* Make sure the store in p_nextlock completes before performing
|
||||||
the compare-and-swap */
|
the compare-and-swap */
|
||||||
MEMORY_BARRIER();
|
MEMORY_BARRIER();
|
||||||
@@ -214,7 +214,7 @@ again:
|
|||||||
maxprio = thr->p_priority;
|
maxprio = thr->p_priority;
|
||||||
}
|
}
|
||||||
ptr = &(thr->p_nextlock);
|
ptr = &(thr->p_nextlock);
|
||||||
thr = *ptr;
|
thr = (pthread_descr)((long)(thr->p_nextlock) & ~1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove max prio thread from waiting list. */
|
/* Remove max prio thread from waiting list. */
|
||||||
@@ -226,13 +226,13 @@ again:
|
|||||||
least significant bit is clear. */
|
least significant bit is clear. */
|
||||||
thr = (pthread_descr) (oldstatus & ~1L);
|
thr = (pthread_descr) (oldstatus & ~1L);
|
||||||
if (! __compare_and_swap_with_release_semantics
|
if (! __compare_and_swap_with_release_semantics
|
||||||
(&lock->__status, oldstatus, (long)(thr->p_nextlock)))
|
(&lock->__status, oldstatus, (long)(thr->p_nextlock) & ~1L))
|
||||||
goto again;
|
goto again;
|
||||||
} else {
|
} else {
|
||||||
/* No risk of concurrent access, remove max prio thread normally.
|
/* No risk of concurrent access, remove max prio thread normally.
|
||||||
But in this case we must also flip the least significant bit
|
But in this case we must also flip the least significant bit
|
||||||
of the status to mark the lock as released. */
|
of the status to mark the lock as released. */
|
||||||
thr = *maxptr;
|
thr = (pthread_descr)((long)*maxptr & ~1L);
|
||||||
*maxptr = thr->p_nextlock;
|
*maxptr = thr->p_nextlock;
|
||||||
|
|
||||||
/* Ensure deletion from linked list completes before we
|
/* Ensure deletion from linked list completes before we
|
||||||
|
@@ -1084,7 +1084,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
|
|||||||
outstring (string, len); \
|
outstring (string, len); \
|
||||||
if (left) \
|
if (left) \
|
||||||
PAD (L' '); \
|
PAD (L' '); \
|
||||||
if (string_malloced) \
|
if (__builin_expect (string_malloced, 0)) \
|
||||||
free (string); \
|
free (string); \
|
||||||
} \
|
} \
|
||||||
break;
|
break;
|
||||||
@@ -1255,7 +1255,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
|
|||||||
outstring (string, len); \
|
outstring (string, len); \
|
||||||
if (left) \
|
if (left) \
|
||||||
PAD (' '); \
|
PAD (' '); \
|
||||||
if (string_malloced) \
|
if (__builtin_expect (string_malloced, 0)) \
|
||||||
free (string); \
|
free (string); \
|
||||||
} \
|
} \
|
||||||
break;
|
break;
|
||||||
@@ -1595,7 +1595,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
|
|||||||
/* The format is correctly handled. */
|
/* The format is correctly handled. */
|
||||||
++nspecs_done;
|
++nspecs_done;
|
||||||
|
|
||||||
free (workstart);
|
if (__builtin_expect (workstart != NULL, 0))
|
||||||
|
free (workstart);
|
||||||
workstart = NULL;
|
workstart = NULL;
|
||||||
|
|
||||||
/* Look for next format specifier. */
|
/* Look for next format specifier. */
|
||||||
@@ -1893,7 +1894,8 @@ do_positional:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
free (workstart);
|
if (__builtin_expect (workstart != NULL, 0))
|
||||||
|
free (workstart);
|
||||||
workstart = NULL;
|
workstart = NULL;
|
||||||
|
|
||||||
/* Write the following constant string. */
|
/* Write the following constant string. */
|
||||||
@@ -1904,7 +1906,8 @@ do_positional:
|
|||||||
}
|
}
|
||||||
|
|
||||||
all_done:
|
all_done:
|
||||||
free (workstart);
|
if (__builtin_expect (workstart != NULL, 0))
|
||||||
|
free (workstart);
|
||||||
/* Unlock the stream. */
|
/* Unlock the stream. */
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
_IO_funlockfile (s);
|
_IO_funlockfile (s);
|
||||||
|
@@ -37,7 +37,7 @@ do \
|
|||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
while (0);
|
while (0);
|
||||||
|
|
||||||
/* Returns 0 if everything is ok, != 0 in case of error. */
|
/* Returns 0 if everything is ok, != 0 in case of error. */
|
||||||
int
|
int
|
||||||
process_elf_file (const char *file_name, const char *lib, int *flag,
|
process_elf_file (const char *file_name, const char *lib, int *flag,
|
||||||
@@ -46,15 +46,15 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
int loadaddr;
|
ElfW(Addr) loadaddr;
|
||||||
unsigned int dynamic_addr;
|
unsigned int dynamic_addr;
|
||||||
size_t dynamic_size;
|
size_t dynamic_size;
|
||||||
char *program_interpreter;
|
char *program_interpreter;
|
||||||
|
|
||||||
ElfW(Ehdr) *elf_header;
|
ElfW(Ehdr) *elf_header;
|
||||||
ElfW(Phdr) *elf_pheader, *segment;
|
ElfW(Phdr) *elf_pheader, *segment;
|
||||||
ElfW(Dyn) *dynamic_segment, *dyn_entry;
|
ElfW(Dyn) *dynamic_segment, *dyn_entry;
|
||||||
char *dynamic_strings;
|
char *dynamic_strings;
|
||||||
|
|
||||||
elf_header = (ElfW(Ehdr) *) file_contents;
|
elf_header = (ElfW(Ehdr) *) file_contents;
|
||||||
*osversion = 0;
|
*osversion = 0;
|
||||||
@@ -79,7 +79,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
|||||||
elf_header->e_type);
|
elf_header->e_type);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get information from elf program header. */
|
/* Get information from elf program header. */
|
||||||
elf_pheader = (ElfW(Phdr) *) (elf_header->e_phoff + file_contents);
|
elf_pheader = (ElfW(Phdr) *) (elf_header->e_phoff + file_contents);
|
||||||
check_ptr (elf_pheader);
|
check_ptr (elf_pheader);
|
||||||
@@ -87,7 +87,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
|||||||
/* The library is an elf library, now search for soname and
|
/* The library is an elf library, now search for soname and
|
||||||
libc5/libc6. */
|
libc5/libc6. */
|
||||||
*flag = FLAG_ELF;
|
*flag = FLAG_ELF;
|
||||||
|
|
||||||
loadaddr = -1;
|
loadaddr = -1;
|
||||||
dynamic_addr = 0;
|
dynamic_addr = 0;
|
||||||
dynamic_size = 0;
|
dynamic_size = 0;
|
||||||
@@ -101,8 +101,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
|||||||
{
|
{
|
||||||
case PT_LOAD:
|
case PT_LOAD:
|
||||||
if (loadaddr == -1)
|
if (loadaddr == -1)
|
||||||
loadaddr = (segment->p_vaddr & 0xfffff000)
|
loadaddr = segment->p_vaddr - segment_p_offset;
|
||||||
- (segment->p_offset & 0xfffff000);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PT_DYNAMIC:
|
case PT_DYNAMIC:
|
||||||
@@ -144,7 +143,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (loadaddr == -1)
|
if (loadaddr == -1)
|
||||||
{
|
{
|
||||||
@@ -155,7 +154,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
|||||||
/* Now we can read the dynamic sections. */
|
/* Now we can read the dynamic sections. */
|
||||||
if (dynamic_size == 0)
|
if (dynamic_size == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
dynamic_segment = (ElfW(Dyn) *) (file_contents + dynamic_addr);
|
dynamic_segment = (ElfW(Dyn) *) (file_contents + dynamic_addr);
|
||||||
check_ptr (dynamic_segment);
|
check_ptr (dynamic_segment);
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
|||||||
|
|
||||||
if (dyn_entry->d_tag == DT_NEEDED)
|
if (dyn_entry->d_tag == DT_NEEDED)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (*flag == FLAG_ELF)
|
if (*flag == FLAG_ELF)
|
||||||
{
|
{
|
||||||
/* Check if this is enough to classify the binary. */
|
/* Check if this is enough to classify the binary. */
|
||||||
@@ -204,7 +203,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
|||||||
|
|
||||||
else if (dyn_entry->d_tag == DT_SONAME)
|
else if (dyn_entry->d_tag == DT_SONAME)
|
||||||
*soname = xstrdup (name);
|
*soname = xstrdup (name);
|
||||||
|
|
||||||
/* Do we have everything we need? */
|
/* Do we have everything we need? */
|
||||||
if (*soname && *flag != FLAG_ELF)
|
if (*soname && *flag != FLAG_ELF)
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -1,15 +1,13 @@
|
|||||||
sysdep-CFLAGS += -mcpu=v8 -mtune=ultrasparc -Wa,-Av9a
|
sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a
|
||||||
|
|
||||||
ifeq ($(subdir),csu)
|
ifeq ($(subdir),csu)
|
||||||
sysdep_routines += hp-timing
|
sysdep_routines += hp-timing
|
||||||
static-only-routines += hp-timing
|
static-only-routines += hp-timing
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(subst gnulib,string,$(subdir)),string)
|
|
||||||
ASFLAGS-.o += -Wa,-Av9a
|
ASFLAGS-.o += -Wa,-Av9a
|
||||||
ASFLAGS-.os += -Wa,-Av9a
|
ASFLAGS-.os += -Wa,-Av9a
|
||||||
ASFLAGS-.op += -Wa,-Av9a
|
ASFLAGS-.op += -Wa,-Av9a
|
||||||
ASFLAGS-.og += -Wa,-Av9a
|
ASFLAGS-.og += -Wa,-Av9a
|
||||||
ASFLAGS-.ob += -Wa,-Av9a
|
ASFLAGS-.ob += -Wa,-Av9a
|
||||||
ASFLAGS-.oS += -Wa,-Av9a
|
ASFLAGS-.oS += -Wa,-Av9a
|
||||||
endif
|
|
||||||
|
Reference in New Issue
Block a user