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:
parent
e3726b056b
commit
44c8d1a2a8
19
ChangeLog
19
ChangeLog
@ -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>
|
||||
|
||||
* sysdeps/unix/i386/brk.S [PIC]: Set __curbrk through the GOT.
|
||||
|
@ -77,6 +77,7 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
|
||||
goto interrupted;
|
||||
|
||||
case MACH_SEND_INTERRUPTED: /* RPC didn't get out. */
|
||||
case EINTR: /* Server not cooperating with interrupt. */
|
||||
if (ss->intr_port != MACH_PORT_NULL)
|
||||
/* If this signal was for us and it should interrupt calls, the
|
||||
signal thread will have cleared SS->intr_port.
|
||||
|
@ -155,27 +155,27 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
|
||||
|
||||
/* When the file using this macro is linked in, the linker
|
||||
will emit a warning message MSG. */
|
||||
/* When a reference to SYMBOL is encountered, the linker will emit a
|
||||
warning message MSG. */
|
||||
#ifdef HAVE_GNU_LD
|
||||
#ifdef HAVE_ELF
|
||||
#define link_warning(msg) \
|
||||
static const char __evoke_link_warning__[] \
|
||||
__attribute__ ((section (".gnu.warning"))) = msg;
|
||||
#define link_warning(symbol, msg) \
|
||||
static const char __evoke_link_warning_##symbol[] \
|
||||
__attribute__ ((section (".gnu.warning." #symbol))) = msg;
|
||||
#else
|
||||
#define link_warning(msg) \
|
||||
#define link_warning(symbol, msg) \
|
||||
asm(".stabs \"" msg "\",30,0,0,0\n" \
|
||||
".stabs \"__evoke_link_warning__\",1,0,0,0\n"\
|
||||
".stabs \"__evoke_link_warning__\",2,0,0,0\n");
|
||||
".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
|
||||
#endif
|
||||
#else
|
||||
/* We will never be heard; they will all die horribly. */
|
||||
#define link_warning(msg)
|
||||
#define link_warning(symbol, msg)
|
||||
#endif
|
||||
|
||||
/* A canned warning for sysdeps/stub functions. */
|
||||
#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")
|
||||
|
||||
/*
|
||||
|
||||
|
@ -3040,7 +3040,7 @@ re_compile_fastmap (bufp)
|
||||
case at_dot:
|
||||
case after_dot:
|
||||
continue;
|
||||
#endif /* not emacs */
|
||||
#endif /* emacs */
|
||||
|
||||
|
||||
case no_op:
|
||||
@ -3279,6 +3279,17 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
|
||||
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. */
|
||||
if (fastmap && !bufp->fastmap_accurate)
|
||||
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)
|
||||
goto fail;
|
||||
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:
|
||||
DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
|
||||
|
@ -21,7 +21,8 @@ Cambridge, MA 02139, USA. */
|
||||
#include <errno.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,
|
||||
removing the trailing newline. Return S or NULL. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
@ -22,11 +22,7 @@ Cambridge, MA 02139, USA. */
|
||||
#include <ansidecl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define MEMCPY(dst, src, s) \
|
||||
((s) == sizeof (int) \
|
||||
? (*(int *) (dst) = *(int *) (src), (dst)) \
|
||||
: memcpy (dst, src, s))
|
||||
#include <memcopy.h>
|
||||
|
||||
static void
|
||||
DEFUN(msort_with_tmp, (b, n, s, cmp, t),
|
||||
@ -49,22 +45,38 @@ DEFUN(msort_with_tmp, (b, n, s, cmp, t),
|
||||
|
||||
tmp = t;
|
||||
|
||||
while (n1 > 0 && n2 > 0)
|
||||
{
|
||||
if ((*cmp) (b1, b2) <= 0)
|
||||
{
|
||||
MEMCPY (tmp, b1, s);
|
||||
b1 += s;
|
||||
--n1;
|
||||
}
|
||||
else
|
||||
{
|
||||
MEMCPY (tmp, b2, s);
|
||||
b2 += s;
|
||||
--n2;
|
||||
}
|
||||
tmp += s;
|
||||
}
|
||||
if (s == OPSIZ && (b1 - b2) % OPSIZ == 0)
|
||||
/* We are operating on aligned words. Use direct word stores. */
|
||||
while (n1 > 0 && n2 > 0)
|
||||
{
|
||||
if ((*cmp) (b1, b2) <= 0)
|
||||
{
|
||||
--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;
|
||||
--n1;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy (tmp, b2, s);
|
||||
b2 += s;
|
||||
--n2;
|
||||
}
|
||||
tmp += s;
|
||||
}
|
||||
if (n1 > 0)
|
||||
memcpy (tmp, b1, n1 * s);
|
||||
memcpy (b, t, (n - n2) * s);
|
||||
|
@ -25,11 +25,11 @@ ENTRY (__longjmp)
|
||||
movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */
|
||||
movl 8(%esp), %eax /* Second argument is return value. */
|
||||
/* Restore registers. */
|
||||
movl JB_BX(%ecx), %ebx
|
||||
movl JB_SI(%ecx), %esi
|
||||
movl JB_DI(%ecx), %edi
|
||||
movl JB_BP(%ecx), %ebp
|
||||
movl JB_SP(%ecx), %esp
|
||||
movl (JB_BX*4)(%ecx), %ebx
|
||||
movl (JB_SI*4)(%ecx), %esi
|
||||
movl (JB_DI*4)(%ecx), %edi
|
||||
movl (JB_BP*4)(%ecx), %ebp
|
||||
movl (JB_SP*4)(%ecx), %esp
|
||||
/* Jump to saved PC. */
|
||||
movl JB_PC(%ecx), %ecx
|
||||
movl (JB_PC*4)(%ecx), %ecx
|
||||
jmp *%ecx
|
||||
|
@ -65,7 +65,7 @@ elf_machine_load_address (void)
|
||||
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. */
|
||||
#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);
|
||||
|
||||
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
|
||||
|
@ -24,13 +24,26 @@ Cambridge, MA 02139, USA. */
|
||||
ENTRY (__sigsetjmp)
|
||||
movl 4(%esp), %eax /* User's jmp_buf in %eax. */
|
||||
/* Save registers. */
|
||||
movl %ebx, JB_BX(%eax)
|
||||
movl %esi, JB_SI(%eax)
|
||||
movl %edi, JB_DI(%eax)
|
||||
movl %ebp, JB_BP(%eax)
|
||||
movl %ebx, (JB_BX*4)(%eax)
|
||||
movl %esi, (JB_SI*4)(%eax)
|
||||
movl %edi, (JB_DI*4)(%eax)
|
||||
movl %ebp, (JB_BP*4)(%eax)
|
||||
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 %ecx, JB_PC(%eax)
|
||||
xorl %eax, %eax /* Return zero. */
|
||||
ret
|
||||
movl %ecx, (JB_PC*4)(%eax)
|
||||
|
||||
/* 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user