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] x32: Set GLRO(dl_platform) to "x86_64" by default [BZ #22363]


On Mon, Oct 30, 2017 at 9:28 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Okt 30 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>
>> On Mon, Oct 30, 2017 at 12:05 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> On Okt 29 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>>>
>>>> Set dl_platform to "x86_64" for x32 by default since kernel may set it
>>>> to "i686".
>>>
>>> Why does it do that?  Isn't that a kernel bug?
>>>
>>
>> There is
>>
>> include/asm/elf.h:#define COMPAT_ELF_PLATFORM         ("i686")
>>
>> It is much simpler to fix it in glibc.
>
> Take a look how this is solved for aarch64 ILP32.
>

I saw

#define ELF_PLATFORM ("aarch64_be")
#define ELF_PLATFORM ("aarch64")
#define COMPAT_ELF_PLATFORM ("v8b")
#define COMPAT_ELF_PLATFORM ("v8l")

on staging/ilp32-4.13 branch.

I assume v8l/v8b will be used as AT_PLATFORM for both ILP32 and
arm32 programs.    I don't see how this approach can work for i686
and x32.

-- 
H.J.


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