This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add AT_PLATFORM to _dl_aux_init ()
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 22 Oct 2015 09:56:18 -0400
- Subject: Re: [PATCH] Add AT_PLATFORM to _dl_aux_init ()
- Authentication-results: sourceware.org; auth=none
- References: <C3307D15-82BC-4BFD-8628-CDB9CAE83180 at linux dot vnet dot ibm dot com> <8737x3zzd1 dot fsf at totoro dot br dot ibm dot com> <5628511D dot 8080608 at redhat dot com> <20151022053016 dot GH26317 at vapier dot lan>
On 10/22/2015 01:30 AM, Mike Frysinger wrote:
> On 21 Oct 2015 22:59, Carlos O'Donell wrote:
>> On 10/21/2015 05:27 PM, Tulio Magno Quites Machado Filho wrote:
>>> Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> writes:
>>>> This should be trivial.
>>>>
>>>> While reviewing another patch of mine, Carlos OâDonell found that
>>>> AT_PLATFORM was absent from the case statement in _dl_aux_init
>>>> (). This patch adds that there, to keep that function in sync with its
>>>> shared case counterpart (_dl_sysdep_start).
>>>
>>> LGTM.
>>>
>>> O'Donnel, as you requested this: do you have any comments or should I proceed
>>> with commit?
>>
>> I don't see this patch in the patch tracker nor on libc-alpha.
>>
>> Did I miss something?
>
> he attached it to his first e-mail. i wonder if that confuses patchwork.
> it's in the glibc archive at least.
> https://sourceware.org/ml/libc-alpha/2015-10/msg00285.html
Thanks.
One nit...
> From 62d8f9a37edc4e9a3d3f68d2da0be50fc52d8d34 Mon Sep 17 00:00:00 2001
> From: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
> Date: Fri, 9 Oct 2015 16:01:35 -0300
> Subject: [PATCH] Add AT_PLATFORM to _dl_aux_init ()
>
> Added AT_PLATFORM to _dl_aux_init () function to keep it in sync with
> _dl_sysdep_start ().
>
> 2015-10-09 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
>
> * elf/dl-support.c:
> (_dl_aux_init): Added AT_PLATFORM to the case statement.
> ---
> elf/dl-support.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/elf/dl-support.c b/elf/dl-support.c
> index 9bbaa5b..9af0d8a 100644
> --- a/elf/dl-support.c
> +++ b/elf/dl-support.c
> @@ -244,6 +244,9 @@ _dl_aux_init (ElfW(auxv_t) *av)
> case AT_PHNUM:
> GL(dl_phnum) = av->a_un.a_val;
> break;
> + case AT_PLATFORM:
> + GLRO(dl_platform) = (void *) av->a_un.a_val;
You explicitly cast the `uint64_t/uint32_t` to `void *`,
but GLRO(dl_platform) is a `const char *`.
Why not cast to that?
I agree that the rest of the cases don't cast properly either.
> + break;
> case AT_HWCAP:
> GLRO(dl_hwcap) = (unsigned long int) av->a_un.a_val;
> break;
> --
> 2.3.8 (Apple Git-58)
Cheers,
Carlos.