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: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Cc:
- Date: Tue, 27 Oct 2015 17:30:21 -0200
- 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> <5628EB02 dot 9090803 at redhat dot com> <5DEFB1C8-7245-4063-A41F-D883C3A802D5 at linux dot vnet dot ibm dot com> <5628FCC8 dot 7040805 at redhat dot com>
"Carlos O'Donell" <carlos@redhat.com> writes:
> On 10/22/2015 10:41 AM, Carlos Eduardo Seo wrote:
>>
>>> On Oct 22, 2015, at 8:56 AM, Carlos O'Donell <carlos@redhat.com> wrote:
>>>>
>>>> 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.
>>
>> TBH, I just copied the code from _dl_sysdep_start for consistency.
>> Maybe we should do a cleanup on these in the future?
>
> Agreed. LGTM then.
Great!
Pushed as 76c5ae0.
Thanks!
--
Tulio Magno