* [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature
@ 2012-08-08 21:59 Roland McGrath
2012-08-09 22:56 ` Carlos O'Donell
0 siblings, 1 reply; 6+ messages in thread
From: Roland McGrath @ 2012-08-08 21:59 UTC (permalink / raw)
To: libc-ports
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature
2012-08-08 21:59 [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature Roland McGrath
@ 2012-08-09 22:56 ` Carlos O'Donell
2012-08-09 23:00 ` Roland McGrath
2012-08-10 9:02 ` Andreas Schwab
0 siblings, 2 replies; 6+ messages in thread
From: Carlos O'Donell @ 2012-08-09 22:56 UTC (permalink / raw)
To: Roland McGrath; +Cc: libc-ports
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature
2012-08-09 22:56 ` Carlos O'Donell
@ 2012-08-09 23:00 ` Roland McGrath
2012-08-09 23:30 ` Joseph S. Myers
2012-08-10 9:02 ` Andreas Schwab
1 sibling, 1 reply; 6+ messages in thread
From: Roland McGrath @ 2012-08-09 23:00 UTC (permalink / raw)
To: Carlos O'Donell; +Cc: libc-ports
> I did a quick scan of all the other targets and noticed something I
> thought was odd...
Not so odd, but you remind me that sotruss-lib.c needs the same treatment
the other audit stuff got to move machine-dependent bits into sysdeps files.
> 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?
Yes, I think it should be modifiable and those signatures are wrong.
Clearly we'd be well-served by a test of an audit module with a pltenter
function that actually does something.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature
2012-08-09 23:00 ` Roland McGrath
@ 2012-08-09 23:30 ` Joseph S. Myers
2012-08-09 23:39 ` Roland McGrath
0 siblings, 1 reply; 6+ messages in thread
From: Joseph S. Myers @ 2012-08-09 23:30 UTC (permalink / raw)
To: Roland McGrath; +Cc: Carlos O'Donell, libc-ports
On Thu, 9 Aug 2012, Roland McGrath wrote:
> > I did a quick scan of all the other targets and noticed something I
> > thought was odd...
>
> Not so odd, but you remind me that sotruss-lib.c needs the same treatment
> the other audit stuff got to move machine-dependent bits into sysdeps files.
As I noted in <http://sourceware.org/ml/libc-alpha/2012-07/msg00346.html>,
there is duplication between bits/link.h, dl-machine.h, ldsodefs.h,
tst-audit.h and sotruss-lib.c, and some of the architecture-specific
definitions are only because certain internal names are unnecessarily
different between architectures. I certainly don't think that each
architecture providing a sotruss-lib.c file will be a good end-point
regarding getting that information into sysdeps; it should be in a header
file included by a single sotruss-lib.c file instead.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature
2012-08-09 23:30 ` Joseph S. Myers
@ 2012-08-09 23:39 ` Roland McGrath
0 siblings, 0 replies; 6+ messages in thread
From: Roland McGrath @ 2012-08-09 23:39 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: Carlos O'Donell, libc-ports
> regarding getting that information into sysdeps; it should be in a header
> file included by a single sotruss-lib.c file instead.
Sure.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature
2012-08-09 22:56 ` Carlos O'Donell
2012-08-09 23:00 ` Roland McGrath
@ 2012-08-10 9:02 ` Andreas Schwab
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2012-08-10 9:02 UTC (permalink / raw)
To: Carlos O'Donell; +Cc: Roland McGrath, libc-ports
"Carlos O'Donell" <carlos@systemhalted.org> writes:
> Why do sh, sparc, mips, m68k, ia64, alpha use `const struct La_sh_regs
> *' for ARCH_PLTENTER_MEMBERS?
The const was secretly removed in 2413fdb.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-10 9:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 21:59 [COMMITTED PATCH] add missing const in arm_gnu_pltexit signature Roland McGrath
2012-08-09 22:56 ` Carlos O'Donell
2012-08-09 23:00 ` Roland McGrath
2012-08-09 23:30 ` Joseph S. Myers
2012-08-09 23:39 ` Roland McGrath
2012-08-10 9:02 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).