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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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] Fix up ppc __cache_line_size


Jakub Jelinek wrote:
> On Tue, Mar 13, 2007 at 03:56:41PM -0500, Steven Munroe wrote:
>   
>> Roland McGrath wrote:
>>     
>>>> +#ifdef DL_PLATFORM_AUXV
>>>> +      DL_PLATFORM_AUXV
>>>> +#endif
>>>>     
>>>>         
>>> This looks ok to me, but make it # ifdef there inside another #ifdef.
>>>
>>> This will also affect powerpc, which AFAICT was also failing to set its
>>> __cache_line_size in static programs.  It looks to me like that will be fine.
>>>
>>>   
>>>       
>> hmmm looks like powerpc needs a
>> sysdeps/unix/sysv/linux/powerpc/dl-support.c to define DL_PLATFORM_AUXV
>> and include /elf/dl-support.c ?
>>     
>
> IMHO there is no reason to use weak_extern for __cache_line_size.
> Code to check the weak references and only conditionally set it is
> certainly bigger than just defining the hidden variables in libc-start.c
> and dl-sysdep.c.
> Additionally, if you build power4+ optimized ld.so, __cache_line_size
> isn't defined at all and thus dl-machine.c will never use it.
>
> The following patch works for me (though only tested with
> binutils and gcc that support HAVE_ASM_PPC_REL16 (so __cache_line_size
> references don't need runtime relocation).  Not sure if we still support
> older binutils.
>   

Looks good, I'll verify this against the powerpc-cpu add-on as soon as I
finish testing and submitt the MUTEX_HINTS patch I am working on ...

Thanks


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