source: patches/glibc-2.8-alpha_fixes-1.patch@ 8187b7d

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8187b7d was 53ceaca, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Add a patch to alpha that contains general glibc fixes.

  • Property mode set to 100644
File size: 7.0 KB
  • sysdeps/unix/alpha/sysdep.h

    Submitted By: Joe Ciccone <jciccone@gmail.com>
    Date: 2008-10-12
    Initial Package Version: 2.8
    Upstream Status: Reported & No Status
    Origin: http://sources.redhat.com/bugzilla/show_bug.cgi?id=5216
            http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6015_all_alpha-glibc-2.5-no-page-header.patch?rev=1.1&view=log
            http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6016_all_alpha-glibc-2.5-no-asm-elf-header.patch?rev=1.1&view=log
            http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6017_all_alpha-glibc-2.8-creat.patch?rev=1.1&view=log
            Joe Ciccone & http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6018_all_alpha-glibc-2.8-cache-shape.patch?rev=1.1&view=log
    Description: Fixes various problems on alpha.
    
    diff -Naur glibc-2.8.orig/sysdeps/unix/alpha/sysdep.h glibc-2.8/sysdeps/unix/alpha/sysdep.h
    old new  
    397397        _sc_ret = _sc_0, _sc_err = _sc_19;                      \
    398398}
    399399
    400 /* Pointer mangling support.  Note that tls access is slow enough that
    401    we don't deoptimize things by placing the pointer check value there.  */
    402 
    403 #include <stdint.h>
    404 
    405 #if defined NOT_IN_libc && defined IS_IN_rtld
    406 # ifdef __ASSEMBLER__
    407 #  define PTR_MANGLE(dst, src, tmp)                             \
    408         ldah    tmp, __pointer_chk_guard_local($29) !gprelhigh; \
    409         ldq     tmp, __pointer_chk_guard_local(tmp) !gprellow;  \
    410         xor     src, tmp, dst
    411 #  define PTR_MANGLE2(dst, src, tmp)                            \
    412         xor     src, tmp, dst
    413 #  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
    414 #  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
    415 # else
    416 extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
    417 #  define PTR_MANGLE(var)       \
    418   (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
    419 #  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
    420 # endif
    421 #elif defined PIC
    422 # ifdef __ASSEMBLER__
    423 #  define PTR_MANGLE(dst, src, tmp)             \
    424         ldq     tmp, __pointer_chk_guard;       \
    425         xor     src, tmp, dst
    426 #  define PTR_MANGLE2(dst, src, tmp)            \
    427         xor     src, tmp, dst
    428 #  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
    429 #  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
    430 # else
    431 extern uintptr_t __pointer_chk_guard attribute_relro;
    432 #  define PTR_MANGLE(var)       \
    433         (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
    434 #  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
    435 # endif
    436 #endif
    437 
    438400#endif /* ASSEMBLER */
  • sysdeps/unix/sysv/linux/alpha/dl-support.c

    diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.8/sysdeps/unix/sysv/linux/alpha/dl-support.c
    old new  
    1 #include "dl-auxv.h"
    21#include <elf/dl-support.c>
  • sysdeps/unix/sysv/linux/alpha/sys/procfs.h

    diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/procfs.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
    old new  
    2929#include <sys/types.h>
    3030#include <sys/ucontext.h>
    3131#include <sys/user.h>
    32 #include <asm/elf.h>
    3332
    3433__BEGIN_DECLS
    3534
     35/*
     36 * The OSF/1 version of <sys/procfs.h> makes gregset_t 46 entries long.
     37 * I have no idea why that is so.  For now, we just leave it at 33
     38 * (32 general regs + processor status word).
     39 */
     40#define ELF_NGREG       33
     41#define ELF_NFPREG      32
     42
     43typedef unsigned long elf_greg_t;
     44typedef elf_greg_t elf_gregset_t[ELF_NGREG];
     45
     46typedef double elf_fpreg_t;
     47typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
     48
    3649struct elf_siginfo
    3750  {
    3851    int si_signo;                       /* Signal number.  */
  • sysdeps/unix/sysv/linux/alpha/sys/user.h

    diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/user.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/user.h
    old new  
    2323   only. Don't read too much into it. Don't use it for anything other
    2424   than gdb/strace unless you know what you are doing. */
    2525
    26 #include <asm/page.h>
    2726#include <asm/reg.h>
    2827
    2928struct user
     
    4140  char u_comm[32];                              /* user command name */
    4241};
    4342
     43#define PAGE_SHIFT              13
     44#define PAGE_SIZE               (1 << PAGE_SHIFT)
     45#define PAGE_MASK               (~(PAGE_SIZE-1))
    4446#define NBPG                    PAGE_SIZE
    4547#define UPAGES                  1
    4648#define HOST_TEXT_START_ADDR    (u.start_code)
  • sysdeps/unix/sysv/linux/alpha/sysdep.h

    diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sysdep.h
    old new  
    9898        INTERNAL_SYSCALL1(name, err_out, nr, args);                     \
    9999})
    100100
     101/* Pointer mangling support.  Note that tls access is slow enough that
     102   we don't deoptimize things by placing the pointer check value there.  */
     103
     104#if defined NOT_IN_libc && defined IS_IN_rtld
     105# ifdef __ASSEMBLER__
     106#  define PTR_MANGLE(dst, src, tmp)                            \
     107       ldah    tmp, __pointer_chk_guard_local($29) !gprelhigh; \
     108       ldq     tmp, __pointer_chk_guard_local(tmp) !gprellow;  \
     109       xor     src, tmp, dst
     110#  define PTR_MANGLE2(dst, src, tmp)                           \
     111       xor     src, tmp, dst
     112#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
     113#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
     114# else
     115extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
     116#  define PTR_MANGLE(var)      \
     117  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
     118#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
     119# endif
     120#elif defined PIC
     121# ifdef __ASSEMBLER__
     122#  define PTR_MANGLE(dst, src, tmp)            \
     123       ldq     tmp, __pointer_chk_guard;       \
     124       xor     src, tmp, dst
     125#  define PTR_MANGLE2(dst, src, tmp)           \
     126       xor     src, tmp, dst
     127#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
     128#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
     129# else
     130extern uintptr_t __pointer_chk_guard attribute_relro;
     131#  define PTR_MANGLE(var)      \
     132       (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
     133#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
     134# endif
     135#else
     136/* Pointer mangling is not yet supported for static libc on alpha.  */
     137# ifndef __ASSEMBLER__
     138#  define PTR_MANGLE(var)   (void) (var)
     139#  define PTR_DEMANGLE(var) (void) (var)
     140# endif
     141#endif
     142
    101143#endif /* _LINUX_ALPHA_SYSDEP_H */
  • sysdeps/unix/sysv/linux/wordsize-64/creat64.c

    diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.8/sysdeps/unix/sysv/linux/wordsize-64/creat64.c
    old new  
    11/* Defined as alias for the syscall.  */
     2#include <sysdep.h>
     3#ifndef __NR_creat
     4#include "../../../../../io/creat64.c"
     5#endif
Note: See TracBrowser for help on using the repository browser.