1997-05-07 16:31 Ulrich Drepper <drepper@cygnus.com>

* sysdeps/i386/dl-machine.h (elf_machine_rel): Check for mismatch
	in size for copy relocation.
	* sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise.
	* sysdeps/sparc/dl-machine.h (elf_machine_rela): Likewise.
	* sysdeps/powerpc/dl-machine.h (elf_machine_rela): Likewise.
	Patch by Roland McGrath <roland@gnu.ai.mit.edu>.

1997-05-06 13:25  H.J. Lu  <hjl@gnu.ai.mit.edu>

	* stdio-common/bug4.c (main): Use /tmp/bug4.test for concurrency
	with other tests.
	* stdio-common/bug3.c (main): Use /tmp/bug3.test for concurrency
	with other tests.

	* sunrpc/svc_run.c: svc_exit): New, defined.  (svc_run): Test for
	svc_stop variable.
	* sunrpc/rpc/svc.h (svc_exit): New, declared.

1997-05-03 08:47  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* math/libm-test.c (test_not_exception): Don't mix the internal
	exception flags with the host defined FE_* values.  All (indirect)
	callers of this and test_exceptions changed to pass the internal
	flag values.
	(csin_test): Allow invalid exception for +-Inf + i NaN.  Fix typos
	in test names.
	(csinh_test): Allow invalid exception for NaN +- i Inf.

1997-05-03 09:21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/fpu/__math.h (__frexp): Don't raise invalid
	exception on infinite value.
	(__m81_test, __M81_COND_NAN, __M81_COND_INF, __M81_COND_NEG,
	__M81_COND_ZERO): New definitions.

	* sysdeps/m68k/e_pow.c: Raise invalid exception for NaN result.
	Use __m81_test.

	* sysdeps/m68k/s_ccosh.c: Rewritten.
	* sysdeps/m68k/s_csinh.c: Rewritten.
	* sysdeps/m68k/s_ccoshf.c: Don't define huge_val.
	* sysdeps/m68k/s_ccoshl.c: Likewise.
	* sysdeps/m68k/s_csinhf.c: Likewise.
	* sysdeps/m68k/s_csinhl.c: Likewise.

	* sysdeps/m68k/s_ccos.c: New file.
	* sysdeps/m68k/s_ccosf.c: New file.
	* sysdeps/m68k/s_ccosl.c: New file.
	* sysdeps/m68k/s_csin.c: New file.
	* sysdeps/m68k/s_csinf.c: New file.
	* sysdeps/m68k/s_csinl.c: New file.

1997-05-02 19:48  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* Makerules, manual/Makefile: Remove -$(subdir) suffix from subdir
	stamp files to avoid problems with long file names.

1997-05-03 22:24  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/libm-ieee754/e_acoshl.c: Fix test for x < 1.

	* sysdeps/libm-ieee754/e_atan2l.c: Ignore integer bit for Inf and
	NaN.  Fix test for sign of infinite y.

	* sysdeps/libm-ieee754/e_atanhl.c: Fix sign of result.

	* sysdeps/libm-ieee754/e_sinhl.c: Fix test for sign of argument.

1997-05-03 01:15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* csu/Makefile (extra-objs) [$(elf)=yes]: Add abi-note.o to get
	dependencies.

	* csu/abi-note.S: Replace undefined macro ALIGNARG.
	* sysdeps/unix/sysv/linux/abi-tag.h: Don't use assembler comment
	character.

1997-05-03 22:27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/dl-machine.h (elf_machine_load_address): Use notation
	for local label.

1997-05-05 22:00  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* nis/Makefile (libnsl-routines): Add a lot of new file names.

	* nis/nis_names.c (nis_add): Moved from here ...
	* nis/nis_add.c: ... to here and fix parameter flags.
	* nis/nis_names.c (nis_lookup): Moved from here ...
	* nis/nis_lookup.c: ... to here.
	* nis/nis_names.c (nis_modify): Moved from here ...
	* nis/nis_modify.c: ... to here and fix parameter flags.
	* nis/nis_names.c (nis_remove): Moved from here ...
	* nis/nis_remove.c: ... to here and fix parameter flags.
	* nis/nis_names.c: Removed.

	* nis/nis_subr.c (nis_domain_of): Moved from here ...
	* nis/nis_domain_of.c: .. to here.
	* nis/nis_subr.c (nis_domain_of_r): Moved from here ...
	* nis/nis_domain_of_r.c: .. to here and fix pointer errors.

	* nis/nis_addmember.c: New.
	* nis/nis_checkpoint.c: New.
	* nis/nis_creategroup.c: New.
	* nis/nis_defaults.c: New.
	* nis/nis_destroygroup.c: New.
	* nis/nis_getservlist.c: New.
	* nis/nis_ismember.c: New.
	* nis/nis_ping.c: New.
	* nis/nis_print_group_entry.c: New.
	* nis/nis_removemember.c: New.
	* nis/nis_mkdir.c: New.
	* nis/nis_rmdir.c: New.
	* nis/nis_verifygroup.c: New.

	* nis/rpcsvc/nislib.h: Fix internal function declarations.

	* nis/nis_server (nis_servstate): New.
	* nis/nis_server (nis_stats): New.

	* nis/nis_subr.c (nis_leaf_of_r): Fix buffer problems.

	* nis/nis_call.c: Remove debug output.

	* nis/nis_intern.c (__nis_finddirectory): Remove.
This commit is contained in:
Ulrich Drepper 1997-05-07 14:34:37 +00:00
parent 6b00df4189
commit 1f07e61775
9 changed files with 222 additions and 31 deletions

128
ChangeLog
View File

@ -1,3 +1,131 @@
1997-05-07 16:31 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/dl-machine.h (elf_machine_rel): Check for mismatch
in size for copy relocation.
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/sparc/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/powerpc/dl-machine.h (elf_machine_rela): Likewise.
Patch by Roland McGrath <roland@gnu.ai.mit.edu>.
1997-05-06 13:25 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdio-common/bug4.c (main): Use /tmp/bug4.test for concurrency
with other tests.
* stdio-common/bug3.c (main): Use /tmp/bug3.test for concurrency
with other tests.
* sunrpc/svc_run.c: svc_exit): New, defined. (svc_run): Test for
svc_stop variable.
* sunrpc/rpc/svc.h (svc_exit): New, declared.
1997-05-03 08:47 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/libm-test.c (test_not_exception): Don't mix the internal
exception flags with the host defined FE_* values. All (indirect)
callers of this and test_exceptions changed to pass the internal
flag values.
(csin_test): Allow invalid exception for +-Inf + i NaN. Fix typos
in test names.
(csinh_test): Allow invalid exception for NaN +- i Inf.
1997-05-03 09:21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h (__frexp): Don't raise invalid
exception on infinite value.
(__m81_test, __M81_COND_NAN, __M81_COND_INF, __M81_COND_NEG,
__M81_COND_ZERO): New definitions.
* sysdeps/m68k/e_pow.c: Raise invalid exception for NaN result.
Use __m81_test.
* sysdeps/m68k/s_ccosh.c: Rewritten.
* sysdeps/m68k/s_csinh.c: Rewritten.
* sysdeps/m68k/s_ccoshf.c: Don't define huge_val.
* sysdeps/m68k/s_ccoshl.c: Likewise.
* sysdeps/m68k/s_csinhf.c: Likewise.
* sysdeps/m68k/s_csinhl.c: Likewise.
* sysdeps/m68k/s_ccos.c: New file.
* sysdeps/m68k/s_ccosf.c: New file.
* sysdeps/m68k/s_ccosl.c: New file.
* sysdeps/m68k/s_csin.c: New file.
* sysdeps/m68k/s_csinf.c: New file.
* sysdeps/m68k/s_csinl.c: New file.
1997-05-02 19:48 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules, manual/Makefile: Remove -$(subdir) suffix from subdir
stamp files to avoid problems with long file names.
1997-05-03 22:24 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_acoshl.c: Fix test for x < 1.
* sysdeps/libm-ieee754/e_atan2l.c: Ignore integer bit for Inf and
NaN. Fix test for sign of infinite y.
* sysdeps/libm-ieee754/e_atanhl.c: Fix sign of result.
* sysdeps/libm-ieee754/e_sinhl.c: Fix test for sign of argument.
1997-05-03 01:15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* csu/Makefile (extra-objs) [$(elf)=yes]: Add abi-note.o to get
dependencies.
* csu/abi-note.S: Replace undefined macro ALIGNARG.
* sysdeps/unix/sysv/linux/abi-tag.h: Don't use assembler comment
character.
1997-05-03 22:27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/dl-machine.h (elf_machine_load_address): Use notation
for local label.
1997-05-05 22:00 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/Makefile (libnsl-routines): Add a lot of new file names.
* nis/nis_names.c (nis_add): Moved from here ...
* nis/nis_add.c: ... to here and fix parameter flags.
* nis/nis_names.c (nis_lookup): Moved from here ...
* nis/nis_lookup.c: ... to here.
* nis/nis_names.c (nis_modify): Moved from here ...
* nis/nis_modify.c: ... to here and fix parameter flags.
* nis/nis_names.c (nis_remove): Moved from here ...
* nis/nis_remove.c: ... to here and fix parameter flags.
* nis/nis_names.c: Removed.
* nis/nis_subr.c (nis_domain_of): Moved from here ...
* nis/nis_domain_of.c: .. to here.
* nis/nis_subr.c (nis_domain_of_r): Moved from here ...
* nis/nis_domain_of_r.c: .. to here and fix pointer errors.
* nis/nis_addmember.c: New.
* nis/nis_checkpoint.c: New.
* nis/nis_creategroup.c: New.
* nis/nis_defaults.c: New.
* nis/nis_destroygroup.c: New.
* nis/nis_getservlist.c: New.
* nis/nis_ismember.c: New.
* nis/nis_ping.c: New.
* nis/nis_print_group_entry.c: New.
* nis/nis_removemember.c: New.
* nis/nis_mkdir.c: New.
* nis/nis_rmdir.c: New.
* nis/nis_verifygroup.c: New.
* nis/rpcsvc/nislib.h: Fix internal function declarations.
* nis/nis_server (nis_servstate): New.
* nis/nis_server (nis_stats): New.
* nis/nis_subr.c (nis_leaf_of_r): Fix buffer problems.
* nis/nis_call.c: Remove debug output.
* nis/nis_intern.c (__nis_finddirectory): Remove.
1997-05-03 00:53 Ulrich Drepper <drepper@cygnus.com> 1997-05-03 00:53 Ulrich Drepper <drepper@cygnus.com>
* posix/TESTS2C.sed: Recognize only digits in first field. This * posix/TESTS2C.sed: Recognize only digits in first field. This

View File

@ -1,13 +1,12 @@
#include <ansidecl.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
int int
DEFUN_VOID(main) main (void)
{ {
FILE *f; FILE *f;
int i; int i;
const char filename[] = "/tmp/bugtest"; const char filename[] = "/tmp/bug3.test";
f = fopen(filename, "w+"); f = fopen(filename, "w+");
for (i=0; i<9000; i++) for (i=0; i<9000; i++)

View File

@ -1,6 +1,3 @@
#ifdef _LIBC
#include <ansidecl.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
@ -8,13 +5,12 @@
int stdio_block_read = 1, stdio_block_write = 1; int stdio_block_read = 1, stdio_block_write = 1;
int int
DEFUN(main, (argc, argv), main (int argc, char *argv[])
int argc AND char **argv)
{ {
FILE *f; FILE *f;
int i; int i;
char buffer[31]; char buffer[31];
const char filename[] = "/tmp/bugtest"; const char filename[] = "/tmp/bug4.test";
while ((i = getopt (argc, argv, "rw")) != -1) while ((i = getopt (argc, argv, "rw")) != -1)
switch (i) switch (i)
@ -27,17 +23,17 @@ DEFUN(main, (argc, argv),
break; break;
} }
f = fopen(filename, "w+"); f = fopen (filename, "w+");
for (i=0; i<9000; i++) { for (i = 0; i < 9000; ++i)
putc('x', f); putc('x', f);
}
fseek(f, 8180L, 0); fseek (f, 8180L, 0);
fwrite("Where does this text come from?", 1, 31, f); fwrite ("Where does this text come from?", 1, 31, f);
fseek(f, 8180L, 0); fseek (f, 8180L, 0);
fread(buffer, 1, 31, f); fread (buffer, 1, 31, f);
fwrite(buffer, 1, 31, stdout); fwrite (buffer, 1, 31, stdout);
fclose(f); fclose (f);
remove(filename); remove (filename);
if (!memcmp (buffer, "Where does this text come from?", 31)) if (!memcmp (buffer, "Where does this text come from?", 31))
{ {

View File

@ -269,9 +269,10 @@ extern int svc_fds;
* a small program implemented by the svc_rpc implementation itself; * a small program implemented by the svc_rpc implementation itself;
* also see clnt.h for protocol numbers. * also see clnt.h for protocol numbers.
*/ */
extern void svc_getreq __P ((int __rdfds)); extern void svc_getreq __P ((int __rdfds));
extern void svc_getreqset __P ((fd_set *readfds)); extern void svc_getreqset __P ((fd_set *__readfds));
extern void svc_run __P ((void)); /* __attribute__ ((noreturn)) */ extern void svc_exit __P ((void));
extern void svc_run __P ((void));
/* /*
* Socket to use on svcxxx_create call to get default socket * Socket to use on svcxxx_create call to get default socket

View File

@ -39,6 +39,16 @@ static char sccsid[] = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";
#include <errno.h> #include <errno.h>
#include <rpc/rpc.h> #include <rpc/rpc.h>
static int svc_stop = 0;
/* This function can be used as a signal handler to terminate the
server loop. */
void
svc_exit (void)
{
svc_stop = 1;
}
void void
svc_run (void) svc_run (void)
{ {
@ -48,8 +58,13 @@ svc_run (void)
int readfds; int readfds;
#endif /* def FD_SETSIZE */ #endif /* def FD_SETSIZE */
svc_stop = 0;
for (;;) for (;;)
{ {
if (svc_stop)
return;
#ifdef FD_SETSIZE #ifdef FD_SETSIZE
readfds = svc_fdset; readfds = svc_fdset;
#else #else

View File

@ -22,6 +22,8 @@
#define ELF_MACHINE_NAME "i386" #define ELF_MACHINE_NAME "i386"
#include <sys/param.h>
#include <assert.h> #include <assert.h>
/* Return nonzero iff E_MACHINE is compatible with the running host. */ /* Return nonzero iff E_MACHINE is compatible with the running host. */
@ -252,9 +254,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
} }
else else
{ {
#ifndef RTLD_BOOTSTRAP
const Elf32_Sym *const refsym = sym; const Elf32_Sym *const refsym = sym;
#endif
Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
if (sym) if (sym)
value += sym->st_value; value += sym->st_value;
@ -262,7 +262,18 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
switch (ELF32_R_TYPE (reloc->r_info)) switch (ELF32_R_TYPE (reloc->r_info))
{ {
case R_386_COPY: case R_386_COPY:
memcpy (reloc_addr, (void *) value, sym->st_size); if (sym->st_size != refsym->st_size)
{
const char *strtab;
strtab = ((void *) map->l_addr
+ map->l_info[DT_STRTAB]->d_un.d_ptr);
_dl_sysdep_error ("Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
"consider re-linking\n", NULL);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
refsym->st_size));
break; break;
case R_386_GLOB_DAT: case R_386_GLOB_DAT:
case R_386_JMP_SLOT: case R_386_JMP_SLOT:

View File

@ -22,6 +22,8 @@
#define ELF_MACHINE_NAME "m68k" #define ELF_MACHINE_NAME "m68k"
#include <sys/param.h>
#include <assert.h> #include <assert.h>
/* Return nonzero iff E_MACHINE is compatible with the running host. */ /* Return nonzero iff E_MACHINE is compatible with the running host. */
@ -54,14 +56,14 @@ static inline Elf32_Addr
elf_machine_load_address (void) elf_machine_load_address (void)
{ {
Elf32_Addr addr; Elf32_Addr addr;
asm ("here: lea here(%%pc), %0\n" asm (".Lhere: lea .Lhere(%%pc), %0\n"
" sub.l %#here, %0" " sub.l %#.Lhere, %0"
: "=a" (addr)); : "=a" (addr));
return addr; return addr;
} }
/* The `subl' insn above will contain an R_68K_RELATIVE relocation /* The `subl' insn above will contain an R_68K_RELATIVE relocation
entry intended to insert the run-time address of the label `here'. entry intended to insert the run-time address of the label `.Lhere'.
This will be the first relocation in the text of the dynamic 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 linker; we skip it to avoid trying to modify read-only text in this
early stage. */ early stage. */
@ -215,6 +217,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
*reloc_addr = map->l_addr + reloc->r_addend; *reloc_addr = map->l_addr + reloc->r_addend;
else else
{ {
const Elf32_Sym *const refsym = sym;
Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
if (sym) if (sym)
value += sym->st_value; value += sym->st_value;
@ -222,7 +225,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
switch (ELF32_R_TYPE (reloc->r_info)) switch (ELF32_R_TYPE (reloc->r_info))
{ {
case R_68K_COPY: case R_68K_COPY:
memcpy (reloc_addr, (void *) value, sym->st_size); if (sym->st_size != refsym->st_size)
{
const char *strtab;
strtab = ((void *) map->l_addr
+ map->l_info[DT_STRTAB]->d_un.d_ptr);
_dl_sysdep_error ("Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
"consider re-linking\n", NULL);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
refsym->st_size));
break; break;
case R_68K_GLOB_DAT: case R_68K_GLOB_DAT:
case R_68K_JMP_SLOT: case R_68K_JMP_SLOT:

View File

@ -22,6 +22,8 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <link.h> #include <link.h>
#include <sys/param.h>
/* stuff for the PLT */ /* stuff for the PLT */
#define PLT_INITIAL_ENTRY_WORDS 18 #define PLT_INITIAL_ENTRY_WORDS 18
@ -149,6 +151,7 @@ static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version) const Elf32_Sym *sym, const struct r_found_version *version)
{ {
const Elf32_Sym *const refsym = sym;
Elf32_Addr *const reloc_addr = (Elf32_Addr *)(map->l_addr + reloc->r_offset); Elf32_Addr *const reloc_addr = (Elf32_Addr *)(map->l_addr + reloc->r_offset);
Elf32_Word loadbase, finaladdr; Elf32_Word loadbase, finaladdr;
const int rinfo = ELF32_R_TYPE (reloc->r_info); const int rinfo = ELF32_R_TYPE (reloc->r_info);
@ -232,7 +235,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
} }
else if (rinfo == R_PPC_COPY) else if (rinfo == R_PPC_COPY)
{ {
memcpy (reloc_addr, (char *) finaladdr, sym->st_size); if (sym->st_size != refsym->st_size)
{
const char *strtab;
strtab = ((void *) map->l_addr
+ map->l_info[DT_STRTAB]->d_un.d_ptr);
_dl_sysdep_error ("Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
"consider re-linking\n", NULL);
}
memcpy (reloc_addr, (char *) finaladdr, MIN (sym->st_size,
refsym->st_size));
} }
#endif #endif
else if (rinfo == R_PPC_REL32) else if (rinfo == R_PPC_REL32)

View File

@ -22,6 +22,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <link.h> #include <link.h>
#include <sys/param.h>
/* Some SPARC opcodes we need to use for self-modifying code. */ /* Some SPARC opcodes we need to use for self-modifying code. */
@ -113,6 +114,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
} }
else else
{ {
const Elf32_Sym *const refsym = sym;
Elf32_Addr value; Elf32_Addr value;
if (sym->st_shndx != SHN_UNDEF && if (sym->st_shndx != SHN_UNDEF &&
ELF32_ST_BIND (sym->st_info) == STB_LOCAL) ELF32_ST_BIND (sym->st_info) == STB_LOCAL)
@ -128,7 +130,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
switch (ELF32_R_TYPE (reloc->r_info)) switch (ELF32_R_TYPE (reloc->r_info))
{ {
case R_SPARC_COPY: case R_SPARC_COPY:
memcpy (reloc_addr, (void *) value, sym->st_size); if (sym->st_size != refsym->st_size)
{
const char *strtab;
strtab = ((void *) map->l_addr
+ map->l_info[DT_STRTAB]->d_un.d_ptr);
_dl_sysdep_error ("Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
"consider re-linking\n", NULL);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
refsym->st_size));
break; break;
case R_SPARC_GLOB_DAT: case R_SPARC_GLOB_DAT:
case R_SPARC_32: case R_SPARC_32: