2001-04-10  Andreas Schwab  <schwab@suse.de>

	* math/libm-test.inc (csinh_test): Don't require the invalid
	exception for csinh (x + iNaN), but make it optional.

2001-04-09  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/elf/start.S (_start): Add unwind directives.

	* sysdeps/generic/entry.h [!__ASSEMBLY__]: Declare _start.
	* sysdeps/ia64/elf/entry.h: New file.
	* sysdeps/unix/sysv/linux/mips/entry.h [!__ASSEMBLY__]: Declare
	__start.
	* elf/rtld.c: Don't declare ENTRY_POINT.  Use ENTRY_POINT instead
	of &ENTRY_POINT.
	* sysdeps/generic/dl-sysdep.c: Likewise.
	* sysdeps/mach/hurd/dl-sysdep.c: Likewise.
	* sysdeps/ia64/elf/start.S: Save base address of register backing
	store in __libc_ia64_register_backing_store_base.
This commit is contained in:
Ulrich Drepper 2001-04-10 23:12:08 +00:00
parent 58f46c794a
commit a16956f331
9 changed files with 74 additions and 26 deletions

View File

@ -1,3 +1,23 @@
2001-04-10 Andreas Schwab <schwab@suse.de>
* math/libm-test.inc (csinh_test): Don't require the invalid
exception for csinh (x + iNaN), but make it optional.
2001-04-09 David Mosberger <davidm@hpl.hp.com>
* sysdeps/ia64/elf/start.S (_start): Add unwind directives.
* sysdeps/generic/entry.h [!__ASSEMBLY__]: Declare _start.
* sysdeps/ia64/elf/entry.h: New file.
* sysdeps/unix/sysv/linux/mips/entry.h [!__ASSEMBLY__]: Declare
__start.
* elf/rtld.c: Don't declare ENTRY_POINT. Use ENTRY_POINT instead
of &ENTRY_POINT.
* sysdeps/generic/dl-sysdep.c: Likewise.
* sysdeps/mach/hurd/dl-sysdep.c: Likewise.
* sysdeps/ia64/elf/start.S: Save base address of register backing
store in __libc_ia64_register_backing_store_base.
2001-04-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: Fix return

View File

@ -260,8 +260,6 @@ _dl_start_final (void *arg, struct link_map *bootstrap_map_p,
/* Now life is peachy; we can do all normal operations.
On to the real work. */
void ENTRY_POINT (void);
/* Some helper functions. */
/* Arguments to relocate_doit. */
@ -389,7 +387,7 @@ dl_main (const ElfW(Phdr) *phdr,
/* Set up a flag which tells we are just starting. */
_dl_starting_up = 1;
if (*user_entry == (ElfW(Addr)) &ENTRY_POINT)
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
{
/* Ho ho. We are not the program interpreter! We are the program
itself! This means someone ran ld.so as a command. Well, that

View File

@ -2087,8 +2087,8 @@ csinh_test (void)
TEST_c_c (csinh, plus_infty, nan_value, plus_infty, nan_value, IGNORE_ZERO_INF_SIGN);
TEST_c_c (csinh, minus_infty, nan_value, plus_infty, nan_value, IGNORE_ZERO_INF_SIGN);
TEST_c_c (csinh, 9.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION);
TEST_c_c (csinh, -9.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION);
TEST_c_c (csinh, 9.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK);
TEST_c_c (csinh, -9.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK);
TEST_c_c (csinh, nan_value, 0.0, nan_value, 0.0);
TEST_c_c (csinh, nan_value, minus_zero, nan_value, minus_zero);

View File

@ -46,7 +46,6 @@ extern unsigned long int _dl_hwcap;
extern size_t _dl_platformlen;
extern fpu_control_t _dl_fpu_control;
extern void _end;
extern void ENTRY_POINT (void);
/* Protect SUID program against misuse of file descriptors. */
extern void __libc_check_standard_fds (void);
@ -101,7 +100,7 @@ _dl_sysdep_start (void **start_argptr,
DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, _dl_argv, _environ,
_dl_auxv);
user_entry = (ElfW(Addr)) &ENTRY_POINT;
user_entry = (ElfW(Addr)) ENTRY_POINT;
_dl_platform = NULL; /* Default to nothing known about the platform. */
for (av = _dl_auxv; av->a_type != AT_NULL; set_seen (av++))

View File

@ -1 +1,5 @@
#ifndef __ASSEMBLY__
extern void _start (void);
#endif
#define ENTRY_POINT _start

7
sysdeps/ia64/elf/entry.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef __ASSEMBLY__
extern void _start (void);
#endif
/* The function's entry point is stored in the first word of the
function descriptor (plabel) of _start(). */
#define ENTRY_POINT (((long int *) _start)[0])

View File

@ -17,6 +17,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include <asm/unistd.h>
#include <asm/fpu.h>
@ -31,10 +33,12 @@
* out6: stack_end
*/
.global _start
.proc _start
.align 32
.global _start
.proc _start
_start:
.prologue
{ .mlx
alloc r2 = ar.pfs,0,0,7,0
movl r3 = FPSR_DEFAULT
@ -44,38 +48,46 @@ _start:
movl gp = @gprel(0f)
;;
}
0: { .mii
0: { .mmi
ld8 out1 = [out2], 8 /* load argc and move out2 to become argv */
mov.m r10 = ar.bsp /* fetch rbs base address */
mov r9 = ip
;;
}
{ .mii
mov ar.fpsr = r3
sub gp = r9, gp /* back-compute gp value */
adds out6 = 16, sp /* highest non-environment stack address */
;;
}
{ .mfi
mov ar.fpsr = r3
{
addl r11 = @ltoff(__libc_ia64_register_backing_store_base), gp
addl out0 = @ltoff(@fptr(main)), gp
}
{ .mfi
addl out4 = @ltoff(@fptr(_fini)), gp
addl out3 = @ltoff(@fptr(_init)), gp
;;
}
{ .mmi
ld8 r3 = [r11] /* pointer to __libc_ia64_register_backing_store_base */
ld8 out0 = [out0] /* pointer to `main' function descriptor */
ld8 out3 = [out3] /* pointer to `init' function descriptor */
adds out6 = 16, sp /* highest non-environment stack address */
addl out4 = @ltoff(@fptr(_fini)), gp
;;
}
{ .mib
{ .mmi
ld8 out3 = [out3] /* pointer to `init' function descriptor */
ld8 out4 = [out4] /* pointer to `fini' function descriptor */
.save rp, r4
mov r4 = r0 /* terminate unwind chain with a NULL return-pointer */
}
.body
{ .mib
st8 [r3] = r10
mov out5 = ret0 /* dynamic linker destructor */
br.call.sptk.few rp = __libc_start_main
}
{ .mib
mov rp = r0
br.ret.sptk.few rp /* break miserably if we ever return */
;;
break 0 /* break miserably if we ever return */
}
.endp _start
.endp _start
/* Define a symbol for the first piece of initialized data. */
.data
@ -84,3 +96,8 @@ __data_start:
.long 0
.weak data_start
data_start = __data_start
.global __libc_ia64_register_backing_store_base
.align 8
__libc_ia64_register_backing_store_base:
.space 8

View File

@ -47,7 +47,6 @@ extern void __mach_init (void);
extern int _dl_argc;
extern char **_dl_argv;
extern char **_environ;
extern void ENTRY_POINT (void);
int __libc_enable_secure;
int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
@ -119,7 +118,7 @@ _dl_sysdep_start (void **start_argptr,
{
static struct hurd_startup_data nodata;
_dl_hurd_data = &nodata;
nodata.user_entry = (vm_address_t) &ENTRY_POINT;
nodata.user_entry = (vm_address_t) ENTRY_POINT;
}
else
_dl_hurd_data = (void *) p;
@ -128,12 +127,12 @@ _dl_sysdep_start (void **start_argptr,
if (_dl_hurd_data->flags & EXEC_STACK_ARGS &&
_dl_hurd_data->user_entry == 0)
_dl_hurd_data->user_entry = (vm_address_t) &ENTRY_POINT;
_dl_hurd_data->user_entry = (vm_address_t) ENTRY_POINT;
unfmh(); /* XXX */
#if 0 /* XXX make this work for real someday... */
if (_dl_hurd_data->user_entry == (vm_address_t) &ENTRY_POINT)
if (_dl_hurd_data->user_entry == (vm_address_t) ENTRY_POINT)
/* We were invoked as a command, not as the program interpreter.
The generic ld.so code supports this: it will parse the args
as "ld.so PROGRAM [ARGS...]". For booting the Hurd, we

View File

@ -1 +1,5 @@
#ifndef __ASSEMBLY__
extern void __start (void);
#endif
#define ENTRY_POINT __start