[PATCH v3] hppa: Fix bind-now audit (BZ #28857)
John David Anglin
dave.anglin@bell.net
Mon Feb 7 15:28:56 GMT 2022
On 2022-02-07 9:15 a.m., Adhemerval Zanella wrote:
> diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
> index 8da2412fea..535177df66 100644
> --- a/sysdeps/hppa/dl-lookupcfg.h
> +++ b/sysdeps/hppa/dl-lookupcfg.h
> @@ -79,7 +79,9 @@ void attribute_hidden _dl_unmap (struct link_map *map);
> /* Extract the code address from a fixup value */
> #define DL_FIXUP_VALUE_CODE_ADDR(value) ((value).ip)
> #define DL_FIXUP_VALUE_ADDR(value) ((uintptr_t) &(value))
> -#define DL_FIXUP_ADDR_VALUE(addr) (*(struct fdesc *) (addr))
> +/* Clear the plabel bit to get the actual address of the descriptor. */
> +#define DL_FIXUP_ADDR_VALUE(addr) \
> + (*(DL_FIXUP_VALUE_TYPE *) ((unsigned int) (addr) & ~2))
> #define DL_FIXUP_BINDNOW_ADDR_VALUE(addr) (addr)
> -#define DL_FIXUP_BINDNOW_RELOC(value, new_value, st_value) \
> - (*value) = *(struct fdesc *) (st_value)
> +#define DL_FIXUP_BINDNOW_RELOC(value, new_value, st_value) \
> + *(value) = *(DL_FIXUP_VALUE_TYPE *) ((unsigned int) (new_value) & ~2);
This is okay.
Dave
--
John David Anglin dave.anglin@bell.net
More information about the Libc-alpha
mailing list