This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] HPPA/IA64 : Don't use broken DL_AUTO_FUNCTION_ADDRESS()
- From: Andreas Schwab <schwab at suse dot de>
- To: Guy Martin <gmsoft at tuxicoman dot be>
- Cc: Carlos O'Donell <carlos at redhat dot com>, Mike Frysinger <vapier at gentoo dot org>, libc-alpha at sourceware dot org
- Date: Thu, 31 Oct 2013 14:39:41 +0100
- Subject: Re: [PATCH] HPPA/IA64 : Don't use broken DL_AUTO_FUNCTION_ADDRESS()
- Authentication-results: sourceware.org; auth=none
- References: <20131017214754 dot 00555bf3 at dellete> <871u3ina5t dot fsf at igel dot home> <b42704e5527fa00f6e69cacd0d62c19d at tuxicoman dot be> <201310190206 dot 07506 dot vapier at gentoo dot org> <52631FA0 dot 5090403 at redhat dot com> <78728c2956beea68522df0d0e5f8d649 at tuxicoman dot be> <80a141633592ef9ba33d3217af3e9cef at tuxicoman dot be>
Guy Martin <gmsoft@tuxicoman.be> writes:
> diff --git a/elf/dl-close.c b/elf/dl-close.c
> index fe3014c..3735527 100644
> --- a/elf/dl-close.c
> +++ b/elf/dl-close.c
> @@ -274,9 +274,8 @@ _dl_close_worker (struct link_map *map)
>
> /* Next try the old-style destructor. */
> if (imap->l_info[DT_FINI] != NULL)
> - (*(void (*) (void)) DL_DT_FINI_ADDRESS
> - (imap, ((void *) imap->l_addr
> - + imap->l_info[DT_FINI]->d_un.d_ptr))) ();
> + DL_DT_FINI (imap, ((void *) imap->l_addr
> + + imap->l_info[DT_FINI]->d_un.d_ptr));
The macro should have CALL in its name.
> diff --git a/ports/sysdeps/hppa/dl-machine.h b/ports/sysdeps/hppa/dl-machine.h
> index d2411a6..b8587a5 100644
> --- a/ports/sysdeps/hppa/dl-machine.h
> +++ b/ports/sysdeps/hppa/dl-machine.h
> @@ -490,8 +490,12 @@ asm ( \
> #define ELF_MACHINE_NO_REL 1
>
> /* Return the address of the entry point. */
> -#define ELF_MACHINE_START_ADDRESS(map, start) \
> - DL_STATIC_FUNCTION_ADDRESS (map, start)
> +#define ELF_MACHINE_START_ADDRESS(map, start) \
> +({ \
> + ElfW(Addr) addr; \
> + static DL_DT_FUNCTION_ADDRESS(map, start, addr) \
Please make static an argument of the macro.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."