From: Steven Munroe <munroesj@us.ibm.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>,
Roland McGrath <roland@redhat.com>,
Richard Henderson <rth@twiddle.net>,
libc-hacker@sourceware.org
Subject: Re: [PATCH] Fix up ppc __cache_line_size
Date: Thu, 22 Mar 2007 22:01:00 -0000 [thread overview]
Message-ID: <4603005D.1010104@us.ibm.com> (raw)
In-Reply-To: <20070320123958.GW1826@sunsite.mff.cuni.cz>
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.
>
Yup, on power4/5/6 processors we know the cache_line_size is 128 and for
970 the L:inux kernel always sets 128 byte cache lines. So we took the
dynamic cache line size code out of the CPU tuned version.
Unfortunately this also remove the definition of __cache_line_size for
the CPU tuned stuff which we still need for dl-machine. So moving the
definition of __cache_line_size to dl-sysdep.c is the correct answer.
> 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.
>
HAVE_ASM_PPC_REL16 is required for -msecure-plt and this binutils is a
prereq for -mlong-double-128 (GCC-4.1). So I suspect building with older
binutils is not really an option any more.
So this patch is Ok with me.
next prev parent reply other threads:[~2007-03-22 22:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-13 16:48 [rfa] fix alpha ld.so undef symbol Richard Henderson
2007-03-13 20:17 ` Roland McGrath
2007-03-13 20:41 ` Steven Munroe
2007-03-13 21:04 ` Roland McGrath
2007-03-20 12:36 ` [PATCH] Fix up ppc __cache_line_size Jakub Jelinek
2007-03-20 14:59 ` Steven Munroe
2007-03-22 22:01 ` Steven Munroe [this message]
2007-03-13 21:15 ` [rfa] fix alpha ld.so undef symbol Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4603005D.1010104@us.ibm.com \
--to=munroesj@us.ibm.com \
--cc=drepper@redhat.com \
--cc=jakub@redhat.com \
--cc=libc-hacker@sourceware.org \
--cc=roland@redhat.com \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).