This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-ports at sourceware dot org
- Date: Thu, 9 Aug 2012 18:56:22 -0400
- Subject: Re: [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature
- References: <20120808215850.048902C0ED@topped-with-meat.com>
On Wed, Aug 8, 2012 at 5:58 PM, Roland McGrath <roland@hack.frob.com> wrote:
> This fixes a 'discarded const' warning compiling dl-runtime.c, because
> the signature of the function pointer lacked the const that other machines
> have.
>
> Committed as obvious.
>
>
> Thanks,
> Roland
>
>
> ports/ChangeLog.arm
> * sysdeps/arm/ldsodefs.h (ARCH_PLTEXIT_MEMBERS): Use const on
> `struct La_arm_regs *' parameter.
>
> diff --git a/ports/sysdeps/arm/ldsodefs.h b/ports/sysdeps/arm/ldsodefs.h
> index aa323d3..73375b6 100644
> --- a/ports/sysdeps/arm/ldsodefs.h
> +++ b/ports/sysdeps/arm/ldsodefs.h
> @@ -1,5 +1,5 @@
> /* Run-time dynamic linker data structures for loaded ELF shared objects.
> - Copyright (C) 2005 Free Software Foundation, Inc.
> + Copyright (C) 2005-2012 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -32,7 +32,7 @@ struct La_arm_retval;
>
> #define ARCH_PLTEXIT_MEMBERS \
> Elf32_Addr (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \
> - uintptr_t *, struct La_arm_regs *, \
> + uintptr_t *, const struct La_arm_regs *, \
> struct La_arm_retval *, const char *)
>
> #include_next <ldsodefs.h>
I did a quick scan of all the other targets and noticed something I
thought was odd...
Why do sh, sparc, mips, m68k, ia64, alpha use `const struct La_sh_regs
*' for ARCH_PLTENTER_MEMBERS?
Shouldn't that set of register be modifiable by the called audit function?
Cheers,
Carlos.