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: Check __ILP32__ instead of __LP64__


On Sat, Apr 14, 2012 at 3:40 AM, Andreas Jaeger <aj@suse.com> wrote:
> On 04/14/2012 12:27 AM, H.J. Lu wrote:
>>
>> Hi,
>>
>> Here are 3 patches to check ?__ILP32__ instead of __LP64__. ?They
>> are tested on Linux/x32 and Linux/x86-64. ?OK to install?
>>
>> Thanks.
>>
>>
>> H.J.
>> ---
>> ?From e1049703b6757f9c33175a98e0759836117292b8 Mon Sep 17 00:00:00 2001
>> From: "H.J. Lu"<hjl.tools@gmail.com>
>> Date: Fri, 13 Apr 2012 14:57:13 -0700
>> Subject: Check __ILP32__ instead of __LP64__
>>
>> ? ? ? ?* elf/tst-auditmod1.c: Check __ILP32__ instead of __LP64__.
>> ? ? ? ?* elf/tst-auditmod3b.c: Likewise.
>> ? ? ? ?* elf/tst-auditmod4b.c: Likewise.
>> ? ? ? ?* elf/tst-auditmod5b.c: Likewise.
>> ? ? ? ?* elf/tst-auditmod6b.c: Likewise.
>> ? ? ? ?* elf/tst-auditmod6c.c: Likewise.
>> ? ? ? ?* elf/tst-auditmod7b.c: Likewise.
>> diff --git a/elf/tst-auditmod1.c b/elf/tst-auditmod1.c
>> index 67fc758..108d6de 100644
>> --- a/elf/tst-auditmod1.c
>> +++ b/elf/tst-auditmod1.c
>> @@ -109,7 +109,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx,
>> uintptr_t *refcook,
>> ?# define La_retval La_i86_retval
>> ?# define int_retval lrv_eax
>> ?#elif defined __x86_64__
>> -# ifdef __LP64__
>> +# ifndef __ILP32__
>
>
> I don't get why this will help. This is x86-64 specific code, so either LP64
> or ILP32. Therefore the above patch should not make any difference.
>
> The same for all the others...
>
> What am I missing - or is still really not needed?
>

They make no difference when glibc is compiled with GCC >= 3.3.
Since __LP64__ isn't specified by x86-64 psABI, when glibc is
compiled by another compiler, it may not work correctly.

-- 
H.J.


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