This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix dladdr on hppa
- From: John David Anglin <dave dot anglin at bell dot net>
- To: Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Mike Frysinger <vapier at gentoo dot org>
- Cc: Helge Deller <deller at gmx dot de>
- Date: Thu, 7 Jan 2016 09:23:45 -0500
- Subject: Re: [PATCH] Fix dladdr on hppa
- Authentication-results: sourceware.org; auth=none
- References: <6F97DB2A-5F4F-4C30-9F7C-395E49DB18FA at bell dot net> <568E4A89 dot 9020704 at redhat dot com>
On 2016-01-07 6:22 AM, Carlos O'Donell wrote:
When might we have -1 and 0-4096?
They are obviously not real fdescs, but when are they used?
>+ if ((int) addr == -1
>+ || (unsigned int) addr < 4096
>+ || !((unsigned int) addr & 2))
>+ return addr;
-1 is used in gcc's crtstuff.c to mark the end of a list of function
pointers.
0-4096 is page 0 and can't be accessed on PA-RISC. Thus, these values
can be
reserved for special uses. For example, we have for signals:
/* Fake signal functions. */
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
#ifdef __USE_UNIX98
# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold
mask. */
#endif
Dave
--
John David Anglin dave.anglin@bell.net