+1998-08-25 11:43 Ulrich Drepper <drepper@cygnus.com>
+
+ * elf/elf.h: Add syminfo stuff and other DT_* from Solaris' ELF.
+
+1998-08-25 Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>
+
+ * argp/argp.h: Use __inline__ not inline.
+
+ * sysdeps/i386/bits/select.h (FD_ZERO): Rewrite asm not to indicate
+ an input register as being clobbered.
+ * sysdeps/i386/memset.c (memset): Likewise.
+ * sysdeps/i386/bzero.c (__bzero): Likewise.
+ * sysdeps/i386/memcopy.h ({BYTE,WORD}_COPY_[FB]WD): Likewise.
+
+1998-08-25 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * stdlib/jrand48_r.c (__jrand48_r): Set also upper half of result.
+ Fixes PR libc/757 (Reported by Michael Creutz <creutz@bnl.gov).
+
1998-08-24 16:34 Ulrich Drepper <drepper@cygnus.com>
* debug/catchsegv.sh: Handle text preceding backtrace better.
# endif
# ifndef ARGP_EI
-# define ARGP_EI extern inline
+# define ARGP_EI extern __inline__
# endif
ARGP_EI void
Elf64_Xword st_size; /* Symbol size */
} Elf64_Sym;
+/* The syminfo section if available contains additional information about
+ every dynamic symbol. */
+
+typedef struct
+{
+ Elf32_Half si_boundto; /* Direct bindings, symbol bound to */
+ Elf32_Half si_flags; /* Per symbol flags */
+} Elf32_Syminfo;
+
+typedef struct
+{
+ Elf64_Half si_boundto; /* Direct bindings, symbol bound to */
+ Elf64_Half si_flags; /* Per symbol flags */
+} Elf64_Syminfo;
+
+/* Possible values for si_boundto. */
+#define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */
+#define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */
+#define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */
+
+/* Possible bitmasks for si_flags. */
+#define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */
+#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */
+#define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */
+#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy
+ loaded */
+/* Syminfo version values. */
+#define SYMINFO_NONE 0
+#define SYMINFO_CURRENT 1
+#define SYMINFO_NUM 2
+
+
/* Special section index. */
#define SHN_UNDEF 0 /* No section, undefined symbol. */
#define DT_HIPROC 0x7fffffff /* End of processor-specific */
#define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */
+/* DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the
+ Dyn.d_un.d_val field of the Elf*_Dyn structure. This follows Sun's
+ approach. */
+#define DT_VALRNGLO 0x6ffffd00
+#define DT_POSFLAG_1 0x6ffffdfd /* Flags for DT_* entries, effecting
+ the following DT_* entry. */
+#define DT_SYMINSZ 0x6ffffdfe /* Size of syminfo table (in bytes) */
+#define DT_SYMINENT 0x6ffffdff /* Entry size of syminfo */
+#define DT_VALRNGHI 0x6ffffdff
+
+/* DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the
+ Dyn.d_un.d_ptr field of the Elf*_Dyn structure.
+
+ If any adjustment is made to the ELF object after it has been
+ built these entries will need to be adjusted. */
+#define DT_ADDRRNGLO 0x6ffffe00
+#define DT_SYMINFO 0x6ffffeff /* syminfo table */
+#define DT_ADDRRNGHI 0x6ffffeff
+
/* The versioning entry types. The next are defined as part of the
GNU extension. */
#define DT_VERSYM 0x6ffffff0
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
/* Store the result. */
if (sizeof (unsigned short int) == 2)
- *result = (xsubi[2] & 0x7fff) | xsubi[1];
+ *result = ((xsubi[2] & 0x7fff) << 16) | xsubi[1];
else
*result = xsubi[2] & 0x7fffffffl;
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#if defined __GNUC__ && __GNUC__ >= 2
# define __FD_ZERO(fdsetp) \
- __asm__ __volatile__ ("cld; rep; stosl" \
- : "=m" ((fdsetp)->fds_bits[__FDELT (__FD_SETSIZE)]) \
- : "a" (0), "c" (sizeof (__fd_set) \
- / sizeof (__fd_mask)), \
- "D" (&(fdsetp)->fds_bits[0]) \
- :"cx","di","memory")
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__ ("cld; rep; stosl" \
+ : "=m" ((fdsetp)->fds_bits[__FDELT (__FD_SETSIZE)]),\
+ "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "1" (sizeof (__fd_set) \
+ / sizeof (__fd_mask)), \
+ "2" (&(fdsetp)->fds_bits[0]) \
+ : "memory"); \
+ } while (0)
+
# define __FD_SET(fd, fdsetp) \
__asm__ __volatile__ ("btsl %1,%0" \
: "=m" ((fdsetp)->fds_bits[__FDELT (fd)]) \
/* bzero -- set a block of memory to zero. For Intel 80x86, x>=3.
This file is part of the GNU C Library.
- Copyright (C) 1991, 1992, 1993, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1993, 1997, 1998 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
size_t len;
{
/* N.B.: This code is almost verbatim from memset.c. */
-
+ int d0;
unsigned long int dstp = (unsigned long int) dstpp;
/* This explicit register allocation
/* Fill bytes until DSTP is aligned on a longword boundary. */
asm volatile ("rep\n"
"stosb" /* %0, %2, %3 */ :
- "=D" (dstp) :
- "0" (dstp), "c" ((-dstp) % OPSIZ), "a" (x) :
- "cx");
+ "=D" (dstp), "=c" (d0) :
+ "0" (dstp), "1" ((-dstp) % OPSIZ), "a" (x) :
+ "memory");
/* Fill longwords. */
asm volatile ("rep\n"
"stosl" /* %0, %2, %3 */ :
- "=D" (dstp) :
- "0" (dstp), "c" (len / OPSIZ), "a" (x) :
- "cx");
+ "=D" (dstp), "=c" (d0) :
+ "0" (dstp), "1" (len / OPSIZ), "a" (x) :
+ "memory");
len %= OPSIZ;
}
/* Write the last few bytes. */
asm volatile ("rep\n"
"stosb" /* %0, %2, %3 */ :
- "=D" (dstp) :
+ "=D" (dstp), "=c" (d0) :
"0" (dstp), "c" (len), "a" (x) :
- "cx");
+ "memory");
}
weak_alias (__bzero, bzero)
/* memcopy.h -- definitions for memory copy functions. i386 version.
- Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
#undef BYTE_COPY_FWD
#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \
- asm volatile(/* Clear the direction flag, so copying goes forward. */ \
- "cld\n" \
- /* Copy bytes. */ \
- "rep\n" \
- "movsb" : \
- "=D" (dst_bp), "=S" (src_bp) : \
- "0" (dst_bp), "1" (src_bp), "c" (nbytes) : \
- "cx")
+ do { \
+ int __d0; \
+ asm volatile(/* Clear the direction flag, so copying goes forward. */ \
+ "cld\n" \
+ /* Copy bytes. */ \
+ "rep\n" \
+ "movsb" : \
+ "=D" (dst_bp), "=S" (src_bp), "=c" (__d0) : \
+ "0" (dst_bp), "1" (src_bp), "2" (nbytes) : \
+ "memory"); \
+ } while (0)
#undef BYTE_COPY_BWD
#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes) \
do \
{ \
+ int __d0; \
asm volatile(/* Set the direction flag, so copying goes backwards. */ \
"std\n" \
/* Copy bytes. */ \
"movsb\n" \
/* Clear the dir flag. Convention says it should be 0. */ \
"cld" : \
- "=D" (dst_ep), "=S" (src_ep) : \
- "0" (dst_ep - 1), "1" (src_ep - 1), "c" (nbytes) : \
- "cx"); \
+ "=D" (dst_ep), "=S" (src_ep), "=c" (__d0) : \
+ "0" (dst_ep - 1), "1" (src_ep - 1), "2" (nbytes) : \
+ "memory"); \
dst_ep += 1; \
src_ep += 1; \
} while (0)
#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \
do \
{ \
+ int __d0; \
asm volatile(/* Clear the direction flag, so copying goes forward. */ \
"cld\n" \
/* Copy longwords. */ \
"rep\n" \
"movsl" : \
- "=D" (dst_bp), "=S" (src_bp) : \
- "0" (dst_bp), "1" (src_bp), "c" ((nbytes) / 4) : \
- "cx"); \
+ "=D" (dst_bp), "=S" (src_bp), "=c" (__d0) : \
+ "0" (dst_bp), "1" (src_bp), "2" ((nbytes) / 4) : \
+ "memory"); \
(nbytes_left) = (nbytes) % 4; \
} while (0)
#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \
do \
{ \
+ int __d0; \
asm volatile(/* Set the direction flag, so copying goes backwards. */ \
"std\n" \
/* Copy longwords. */ \
"movsl\n" \
/* Clear the dir flag. Convention says it should be 0. */ \
"cld" : \
- "=D" (dst_ep), "=S" (src_ep) : \
- "0" (dst_ep - 4), "1" (src_ep - 4), "c" ((nbytes) / 4) : \
- "cx"); \
+ "=D" (dst_ep), "=S" (src_ep), "=c" (__d0) : \
+ "0" (dst_ep - 4), "1" (src_ep - 4), "2" ((nbytes) / 4) : \
+ "memory"); \
dst_ep += 4; \
src_ep += 4; \
(nbytes_left) = (nbytes) % 4; \
/* Set a block of memory to some byte value.
For Intel 80x86, x>=3.
- Copyright (C) 1991, 1992, 1993, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1993, 1997, 1998 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
void *
memset (void *dstpp, int c, size_t len)
{
+ int d0;
unsigned long int dstp = (unsigned long int) dstpp;
/* This explicit register allocation
/* Fill bytes until DSTP is aligned on a longword boundary. */
asm volatile("rep\n"
"stosb" /* %0, %2, %3 */ :
- "=D" (dstp) :
- "0" (dstp), "c" ((-dstp) % OPSIZ), "a" (x) :
- "cx");
+ "=D" (dstp), "=c" (d0) :
+ "0" (dstp), "1" ((-dstp) % OPSIZ), "a" (x) :
+ "memory");
/* Fill longwords. */
asm volatile("rep\n"
"stosl" /* %0, %2, %3 */ :
- "=D" (dstp) :
- "0" (dstp), "c" (len / OPSIZ), "a" (x) :
- "cx");
+ "=D" (dstp), "=c" (d0) :
+ "0" (dstp), "1" (len / OPSIZ), "a" (x) :
+ "memory");
len %= OPSIZ;
}
/* Write the last few bytes. */
asm volatile("rep\n"
"stosb" /* %0, %2, %3 */ :
- "=D" (dstp) :
- "0" (dstp), "c" (len), "a" (x) :
- "cx");
+ "=D" (dstp), "=c" (d0) :
+ "0" (dstp), "1" (len), "a" (x) :
+ "memory");
return dstpp;
}