[PATCH] Fix dladdr on hppa
John David Anglin
dave.anglin@bell.net
Thu Jan 7 14:23:00 GMT 2016
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
More information about the Libc-alpha
mailing list