]> sourceware.org Git - glibc.git/commitdiff
007-03-20 Jakub Jelinek <jakub@redhat.com>
authorUlrich Drepper <drepper@redhat.com>
Mon, 26 Mar 2007 20:09:10 +0000 (20:09 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 26 Mar 2007 20:09:10 +0000 (20:09 +0000)
* sysdeps/unix/sysv/linux/powerpc/libc-start.c
(__cache_line_size): Define the variable here.  Add
attribute_hidden, remove weak_extern.
(__libc_start_main): Set __cache_line_size
unconditionally.
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
(__cache_line_size): Define the variable here.  Add
attribute_hidden, remove weak_extern.
(DL_PLATFORM_AUXV): Set __cache_line_size
unconditionally.
* sysdeps/powerpc/powerpc32/dl-machine.c (__cache_line_size): Remove
weak_extern, add attribute_hidden.
(__elf_machine_runtime_setup): Assume __cache_line_size is always
defined in ld.so.
* sysdeps/powerpc/powerpc32/memset.S (__cache_line_size): Remove
definition.
* sysdeps/powerpc/powerpc64/memset.S (__cache_line_size): Likewise.

ChangeLog
sysdeps/powerpc/powerpc32/dl-machine.c
sysdeps/powerpc/powerpc32/memset.S
sysdeps/powerpc/powerpc64/memset.S
sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c

index 9daefc35d2fe6f34c2c371ddc7573d5ce89424f2..1a5f369b2d8b187fb903bbc98458e4b1653a38fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+007-03-20  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/powerpc/libc-start.c
+       (__cache_line_size): Define the variable here.  Add
+       attribute_hidden, remove weak_extern.
+       (__libc_start_main): Set __cache_line_size
+       unconditionally.
+       * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+       (__cache_line_size): Define the variable here.  Add
+       attribute_hidden, remove weak_extern.
+       (DL_PLATFORM_AUXV): Set __cache_line_size
+       unconditionally.
+       * sysdeps/powerpc/powerpc32/dl-machine.c (__cache_line_size): Remove
+       weak_extern, add attribute_hidden.
+       (__elf_machine_runtime_setup): Assume __cache_line_size is always
+       defined in ld.so.
+       * sysdeps/powerpc/powerpc32/memset.S (__cache_line_size): Remove
+       definition.
+       * sysdeps/powerpc/powerpc64/memset.S (__cache_line_size): Likewise.
+
 2007-03-26  Jakub Jelinek  <jakub@redhat.com>
 
        [BZ #4276]
index fc460993b12e4aef27876375cb81b1cee05829c2..fc2ce7c1d91793ae0bd30926bbb910e492813fbd 100644 (file)
 #include <dl-machine.h>
 #include <stdio-common/_itoa.h>
 
-/* The value __cache_line_size is defined in memset.S and is initialised
+/* The value __cache_line_size is defined in dl-sysdep.c and is initialised
    by _dl_sysdep_start via DL_PLATFORM_INIT.  */
-extern int __cache_line_size;
-weak_extern (__cache_line_size)
+extern int __cache_line_size attribute_hidden;
 
 /* Because ld.so is now versioned, these functions can be in their own file;
    no relocations need to be done to call them.
@@ -318,15 +317,9 @@ __elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
       /* Default minimum 4 words per cache line.  */
       int line_size_words = 4;
 
-      /* Don't try this until ld.so has relocated itself!  */
-      int *line_size_ptr = &__cache_line_size;
-      if (lazy && line_size_ptr != NULL)
-       {
-         /*  Verify that __cache_line_size is defined and set.  */
-         if (*line_size_ptr != 0)
-           /* Convert bytes to words.  */
-           line_size_words = *line_size_ptr / 4;
-       }
+      if (lazy && __cache_line_size != 0)
+       /* Convert bytes to words.  */
+       line_size_words = __cache_line_size / 4;
 
       size_modified = lazy ? rel_offset_words : 6;
       for (i = 0; i < size_modified; i += line_size_words)
index f09c2946748ce924bb8f076623b1a6b0593b274c..454abb2b65d3b1b2b859bd6ff044e870bb3821cd 100644 (file)
@@ -1,5 +1,5 @@
 /* Optimized memset implementation for PowerPC.
-   Copyright (C) 1997, 1999, 2000, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000, 2003, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 #include <bp-sym.h>
 #include <bp-asm.h>
 
-/* Define a global static that can hold the cache line size.  The
-   assumption is that startup code will access the "aux vector" to
-   to obtain the value set by the kernel and store it into this
-   variable.  */
-
-       .globl __cache_line_size
-       .lcomm __cache_line_size,4,4
-
 /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
    Returns 's'.
 
index 09c79fccd72374f7c2d40d872d58f80109a5d1a1..e0742ea73f1c5daed4e1e196a95d1ae39113f0e2 100644 (file)
@@ -1,5 +1,6 @@
 /* Optimized memset implementation for PowerPC64.
-   Copyright (C) 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000, 2002, 2003, 2007
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 #include <bp-sym.h>
 #include <bp-asm.h>
 
-/* Define a global static that can hold the cache line size.  The
-   assumption is that startup code will access the "aux vector" to
-   to obtain the value set by the kernel and store it into this
-   variable.  */
-       .globl __cache_line_size
-       .lcomm __cache_line_size,4,4
        .section        ".toc","aw"
 .LC0:
        .tc __cache_line_size[TC],__cache_line_size
index 7c02c68985dcf715d778d5b5e7275d9986128011..9bb8ec3f61fd9934ad8a4e18922b92d8e9b7d633 100644 (file)
@@ -1,5 +1,6 @@
 /* Operating system support for run-time dynamic linker.  Linux/PPC version.
-   Copyright (C) 1997, 1998, 2001, 2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2001, 2003, 2006, 2007
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +22,7 @@
 #include <kernel-features.h>
 #include <ldsodefs.h>
 
-extern int __cache_line_size;
-weak_extern (__cache_line_size)
+int __cache_line_size attribute_hidden;
 
 /* Scan the Aux Vector for the "Data Cache Block Size" entry.  If found
    verify that the static extern __cache_line_size is defined by checking
@@ -30,12 +30,8 @@ weak_extern (__cache_line_size)
    value to __cache_line_size.  */
 #define DL_PLATFORM_AUXV                                                     \
       case AT_DCACHEBSIZE:                                                   \
-       {                                                                     \
-         int *cls = & __cache_line_size;                                     \
-         if (cls != NULL)                                                    \
-           *cls = av->a_un.a_val;                                            \
-       }                                                                     \
-      break;
+       __cache_line_size = av->a_un.a_val;                                   \
+       break;
 
 #ifndef __ASSUME_STD_AUXV
 
This page took 0.052339 seconds and 5 git commands to generate.