This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add AT_PLATFORM to _dl_aux_init ()


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.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]