1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-06-06 11:41:02 +03:00

Fri Sep 1 16:16:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>

* libc-symbols.h (link_warning): Take new first arg SYMBOL; ask
	for a warning on references to that specific symbol, not the
	entire containing object file.
	(stub_warning): Pass symbol name to link_warning.
	* stdio/gets.c: Pass function name in link_warning invocation.

	* hurd/intr-msg.c: Treat apparent EINTR return from msg trap like
	MACH_SEND_INTERRUPTED.  That indicates interrupt_operation was
	sent, but failed.

	* stdlib/msort.c: Include memcopy.h.
	(msort_with_tmp): If operating on aligned op_t words, use direct word
	fetches and stores.

	* sysdeps/i386/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Add
	missing backslash.
This commit is contained in:
Roland McGrath 1995-09-01 22:25:08 +00:00
parent e3726b056b
commit 44c8d1a2a8
9 changed files with 106 additions and 56 deletions

View File

@ -1,3 +1,22 @@
Fri Sep 1 16:16:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* libc-symbols.h (link_warning): Take new first arg SYMBOL; ask
for a warning on references to that specific symbol, not the
entire containing object file.
(stub_warning): Pass symbol name to link_warning.
* stdio/gets.c: Pass function name in link_warning invocation.
* hurd/intr-msg.c: Treat apparent EINTR return from msg trap like
MACH_SEND_INTERRUPTED. That indicates interrupt_operation was
sent, but failed.
* stdlib/msort.c: Include memcopy.h.
(msort_with_tmp): If operating on aligned op_t words, use direct word
fetches and stores.
* sysdeps/i386/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Add
missing backslash.
Thu Aug 31 13:23:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> Thu Aug 31 13:23:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/unix/i386/brk.S [PIC]: Set __curbrk through the GOT. * sysdeps/unix/i386/brk.S [PIC]: Set __curbrk through the GOT.

View File

@ -77,6 +77,7 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
goto interrupted; goto interrupted;
case MACH_SEND_INTERRUPTED: /* RPC didn't get out. */ case MACH_SEND_INTERRUPTED: /* RPC didn't get out. */
case EINTR: /* Server not cooperating with interrupt. */
if (ss->intr_port != MACH_PORT_NULL) if (ss->intr_port != MACH_PORT_NULL)
/* If this signal was for us and it should interrupt calls, the /* If this signal was for us and it should interrupt calls, the
signal thread will have cleared SS->intr_port. signal thread will have cleared SS->intr_port.

View File

@ -155,27 +155,27 @@ Cambridge, MA 02139, USA. */
/* When the file using this macro is linked in, the linker /* When a reference to SYMBOL is encountered, the linker will emit a
will emit a warning message MSG. */ warning message MSG. */
#ifdef HAVE_GNU_LD #ifdef HAVE_GNU_LD
#ifdef HAVE_ELF #ifdef HAVE_ELF
#define link_warning(msg) \ #define link_warning(symbol, msg) \
static const char __evoke_link_warning__[] \ static const char __evoke_link_warning_##symbol[] \
__attribute__ ((section (".gnu.warning"))) = msg; __attribute__ ((section (".gnu.warning." #symbol))) = msg;
#else #else
#define link_warning(msg) \ #define link_warning(symbol, msg) \
asm(".stabs \"" msg "\",30,0,0,0\n" \ asm(".stabs \"" msg "\",30,0,0,0\n" \
".stabs \"__evoke_link_warning__\",1,0,0,0\n"\ ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
".stabs \"__evoke_link_warning__\",2,0,0,0\n");
#endif #endif
#else #else
/* We will never be heard; they will all die horribly. */ /* We will never be heard; they will all die horribly. */
#define link_warning(msg) #define link_warning(symbol, msg)
#endif #endif
/* A canned warning for sysdeps/stub functions. */ /* A canned warning for sysdeps/stub functions. */
#define stub_warning(name) \ #define stub_warning(name) \
link_warning ("warning: " #name " is not implemented and will always fail") link_warning (name, \
"warning: " #name " is not implemented and will always fail")
/* /*

View File

@ -3040,7 +3040,7 @@ re_compile_fastmap (bufp)
case at_dot: case at_dot:
case after_dot: case after_dot:
continue; continue;
#endif /* not emacs */ #endif /* emacs */
case no_op: case no_op:
@ -3279,6 +3279,17 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
range = 1; range = 1;
} }
#ifdef emacs
/* In a forward search for something that starts with \=.
don't keep searching past point. */
if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
{
range = PT - startpos;
if (range <= 0)
return -1;
}
#endif /* emacs */
/* Update the fastmap now if not correct already. */ /* Update the fastmap now if not correct already. */
if (fastmap && !bufp->fastmap_accurate) if (fastmap && !bufp->fastmap_accurate)
if (re_compile_fastmap (bufp) == -2) if (re_compile_fastmap (bufp) == -2)
@ -4682,13 +4693,6 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
if (PTR_CHAR_POS ((unsigned char *) d) <= point) if (PTR_CHAR_POS ((unsigned char *) d) <= point)
goto fail; goto fail;
break; break;
#if 0 /* not emacs19 */
case at_dot:
DEBUG_PRINT1 ("EXECUTING at_dot.\n");
if (PTR_CHAR_POS ((unsigned char *) d) + 1 != point)
goto fail;
break;
#endif /* not emacs19 */
case syntaxspec: case syntaxspec:
DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt); DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);

View File

@ -21,7 +21,8 @@ Cambridge, MA 02139, USA. */
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
link_warning ("the `gets' function is unreliable and should not be used.") link_warning (gets,
"the `gets' function is unreliable and should not be used.")
/* Read a newline-terminated string from stdin into S, /* Read a newline-terminated string from stdin into S,
removing the trailing newline. Return S or NULL. */ removing the trailing newline. Return S or NULL. */

View File

@ -1,5 +1,5 @@
/* msort -- an alternative to qsort, with an identical interface. /* msort -- an alternative to qsort, with an identical interface.
Copyright (C) 1992 Free Software Foundation, Inc. Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Written by Mike Haertel, September 1988. Written by Mike Haertel, September 1988.
This file is part of the GNU C Library. This file is part of the GNU C Library.
@ -22,11 +22,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h> #include <ansidecl.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <memcopy.h>
#define MEMCPY(dst, src, s) \
((s) == sizeof (int) \
? (*(int *) (dst) = *(int *) (src), (dst)) \
: memcpy (dst, src, s))
static void static void
DEFUN(msort_with_tmp, (b, n, s, cmp, t), DEFUN(msort_with_tmp, (b, n, s, cmp, t),
@ -49,17 +45,33 @@ DEFUN(msort_with_tmp, (b, n, s, cmp, t),
tmp = t; tmp = t;
if (s == OPSIZ && (b1 - b2) % OPSIZ == 0)
/* We are operating on aligned words. Use direct word stores. */
while (n1 > 0 && n2 > 0) while (n1 > 0 && n2 > 0)
{ {
if ((*cmp) (b1, b2) <= 0) if ((*cmp) (b1, b2) <= 0)
{ {
MEMCPY (tmp, b1, s); --n1;
*((op_t *) tmp)++ = *((op_t *) b1)++;
}
else
{
--n2;
*((op_t *) tmp)++ = *((op_t *) b2)++;
}
}
else
while (n1 > 0 && n2 > 0)
{
if ((*cmp) (b1, b2) <= 0)
{
memcpy (tmp, b1, s);
b1 += s; b1 += s;
--n1; --n1;
} }
else else
{ {
MEMCPY (tmp, b2, s); memcpy (tmp, b2, s);
b2 += s; b2 += s;
--n2; --n2;
} }

View File

@ -25,11 +25,11 @@ ENTRY (__longjmp)
movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */ movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */
movl 8(%esp), %eax /* Second argument is return value. */ movl 8(%esp), %eax /* Second argument is return value. */
/* Restore registers. */ /* Restore registers. */
movl JB_BX(%ecx), %ebx movl (JB_BX*4)(%ecx), %ebx
movl JB_SI(%ecx), %esi movl (JB_SI*4)(%ecx), %esi
movl JB_DI(%ecx), %edi movl (JB_DI*4)(%ecx), %edi
movl JB_BP(%ecx), %ebp movl (JB_BP*4)(%ecx), %ebp
movl JB_SP(%ecx), %esp movl (JB_SP*4)(%ecx), %esp
/* Jump to saved PC. */ /* Jump to saved PC. */
movl JB_PC(%ecx), %ecx movl (JB_PC*4)(%ecx), %ecx
jmp *%ecx jmp *%ecx

View File

@ -65,7 +65,7 @@ elf_machine_load_address (void)
This will be the first relocation in the text of the dynamic linker; This will be the first relocation in the text of the dynamic linker;
we skip it to avoid trying to modify read-only text in this early stage. */ we skip it to avoid trying to modify read-only text in this early stage. */
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
++(const Elf32_Rel *) (dynamic_info)[DT_REL]->d_un.d_ptr; ++(const Elf32_Rel *) (dynamic_info)[DT_REL]->d_un.d_ptr; \
(dynamic_info)[DT_RELSZ]->d_un.d_val -= sizeof (Elf32_Rel); (dynamic_info)[DT_RELSZ]->d_un.d_val -= sizeof (Elf32_Rel);
/* Perform the relocation specified by RELOC and SYM (which is fully resolved). /* Perform the relocation specified by RELOC and SYM (which is fully resolved).

View File

@ -24,13 +24,26 @@ Cambridge, MA 02139, USA. */
ENTRY (__sigsetjmp) ENTRY (__sigsetjmp)
movl 4(%esp), %eax /* User's jmp_buf in %eax. */ movl 4(%esp), %eax /* User's jmp_buf in %eax. */
/* Save registers. */ /* Save registers. */
movl %ebx, JB_BX(%eax) movl %ebx, (JB_BX*4)(%eax)
movl %esi, JB_SI(%eax) movl %esi, (JB_SI*4)(%eax)
movl %edi, JB_DI(%eax) movl %edi, (JB_DI*4)(%eax)
movl %ebp, JB_BP(%eax) movl %ebp, (JB_BP*4)(%eax)
leal 4(%esp), %ecx /* Save SP as it will be after we return. */ leal 4(%esp), %ecx /* Save SP as it will be after we return. */
movl %ecx, JB_SP(%eax) movl %ecx, (JB_SP*4)(%eax)
movl 0(%esp), %ecx /* Save PC we are returning to now. */ movl 0(%esp), %ecx /* Save PC we are returning to now. */
movl %ecx, JB_PC(%eax) movl %ecx, (JB_PC*4)(%eax)
xorl %eax, %eax /* Return zero. */
ret /* Make a tail call to __sigjmp_save; it takes the same args. */
#ifdef PIC
/* We cannot use the PLT, because it requires that %ebx be set, but
we can't save and restore our caller's value. Instead, we do an
indirect jump through the GOT, using for the temporary register
%ecx, which is call-clobbered. */
call here
here: popl %ecx
addl $_GLOBAL_OFFSET_TABLE_+[.-here], %ecx
movl C_SYMBOL_NAME(__sigjmp_save@GOT)(%ecx), %ecx
jmp *%ecx
#else
jmp __sigjmp_save
#endif