mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Split up stackguard-macros.h into sysdeps directories.
This commit is contained in:
13
ChangeLog
13
ChangeLog
@ -1,5 +1,18 @@
|
|||||||
2012-05-15 Joseph Myers <joseph@codesourcery.com>
|
2012-05-15 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* elf/stackguard-macros.h: Remove file.
|
||||||
|
* sysdeps/generic/stackguard-macros.h: New file.
|
||||||
|
* sysdeps/i386/stackguard-macros.h: Likewise.
|
||||||
|
* sysdeps/powerpc/powerpc32/stackguard-macros.h: Likewise.
|
||||||
|
* sysdeps/powerpc/powerpc64/stackguard-macros.h: Likewise.
|
||||||
|
* sysdeps/s390/s390-32/stackguard-macros.h: Likewise.
|
||||||
|
* sysdeps/s390/s390-64/stackguard-macros.h: Likewise.
|
||||||
|
* sysdeps/sparc/sparc32/stackguard-macros.h: Likewise.
|
||||||
|
* sysdeps/sparc/sparc64/stackguard-macros.h: Likewise.
|
||||||
|
* sysdeps/x86_64/stackguard-macros.h: Likewise.
|
||||||
|
* nptl/tst-stackguard1.c: Include <stackguard-macros.h> not
|
||||||
|
<elf/stackguard-macros.h>.
|
||||||
|
|
||||||
[BZ #14109]
|
[BZ #14109]
|
||||||
* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Use
|
* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Use
|
||||||
__aligned__ in attribute.
|
__aligned__ in attribute.
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#ifdef __i386__
|
|
||||||
# define STACK_CHK_GUARD \
|
|
||||||
({ uintptr_t x; asm ("movl %%gs:0x14, %0" : "=r" (x)); x; })
|
|
||||||
#elif defined __x86_64__
|
|
||||||
# define STACK_CHK_GUARD \
|
|
||||||
({ uintptr_t x; \
|
|
||||||
asm ("mov %%fs:%c1, %0" : "=r" (x) \
|
|
||||||
: "i" (offsetof (tcbhead_t, stack_guard))); x; })
|
|
||||||
#elif defined __powerpc64__
|
|
||||||
# define STACK_CHK_GUARD \
|
|
||||||
({ uintptr_t x; asm ("ld %0,-28688(13)" : "=r" (x)); x; })
|
|
||||||
#elif defined __powerpc__
|
|
||||||
# define STACK_CHK_GUARD \
|
|
||||||
({ uintptr_t x; asm ("lwz %0,-28680(2)" : "=r" (x)); x; })
|
|
||||||
#elif defined __sparc__ && defined __arch64__
|
|
||||||
# define STACK_CHK_GUARD \
|
|
||||||
({ uintptr_t x; asm ("ldx [%%g7+0x28], %0" : "=r" (x)); x; })
|
|
||||||
#elif defined __sparc__
|
|
||||||
# define STACK_CHK_GUARD \
|
|
||||||
({ uintptr_t x; asm ("ld [%%g7+0x14], %0" : "=r" (x)); x; })
|
|
||||||
#elif defined __s390x__
|
|
||||||
# define STACK_CHK_GUARD \
|
|
||||||
({ uintptr_t x; asm ("ear %0,%%a0; sllg %0,%0,32; ear %0,%%a1; lg %0,0x28(%0)" : "=a" (x)); x; })
|
|
||||||
#elif defined __s390__
|
|
||||||
# define STACK_CHK_GUARD \
|
|
||||||
({ uintptr_t x; asm ("ear %0,%%a0; l %0,0x14(%0)" : "=a" (x)); x; })
|
|
||||||
#elif !defined STACK_CHK_GUARD
|
|
||||||
extern uintptr_t __stack_chk_guard;
|
|
||||||
# define STACK_CHK_GUARD __stack_chk_guard
|
|
||||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2005.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2005.
|
||||||
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <elf/stackguard-macros.h>
|
#include <stackguard-macros.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
static const char *command;
|
static const char *command;
|
||||||
|
4
sysdeps/generic/stackguard-macros.h
Normal file
4
sysdeps/generic/stackguard-macros.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
extern uintptr_t __stack_chk_guard;
|
||||||
|
#define STACK_CHK_GUARD __stack_chk_guard
|
4
sysdeps/i386/stackguard-macros.h
Normal file
4
sysdeps/i386/stackguard-macros.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define STACK_CHK_GUARD \
|
||||||
|
({ uintptr_t x; asm ("movl %%gs:0x14, %0" : "=r" (x)); x; })
|
4
sysdeps/powerpc/powerpc32/stackguard-macros.h
Normal file
4
sysdeps/powerpc/powerpc32/stackguard-macros.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define STACK_CHK_GUARD \
|
||||||
|
({ uintptr_t x; asm ("lwz %0,-28680(2)" : "=r" (x)); x; })
|
4
sysdeps/powerpc/powerpc64/stackguard-macros.h
Normal file
4
sysdeps/powerpc/powerpc64/stackguard-macros.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define STACK_CHK_GUARD \
|
||||||
|
({ uintptr_t x; asm ("ld %0,-28688(13)" : "=r" (x)); x; })
|
4
sysdeps/s390/s390-32/stackguard-macros.h
Normal file
4
sysdeps/s390/s390-32/stackguard-macros.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define STACK_CHK_GUARD \
|
||||||
|
({ uintptr_t x; asm ("ear %0,%%a0; l %0,0x14(%0)" : "=a" (x)); x; })
|
4
sysdeps/s390/s390-64/stackguard-macros.h
Normal file
4
sysdeps/s390/s390-64/stackguard-macros.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define STACK_CHK_GUARD \
|
||||||
|
({ uintptr_t x; asm ("ear %0,%%a0; sllg %0,%0,32; ear %0,%%a1; lg %0,0x28(%0)" : "=a" (x)); x; })
|
4
sysdeps/sparc/sparc32/stackguard-macros.h
Normal file
4
sysdeps/sparc/sparc32/stackguard-macros.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define STACK_CHK_GUARD \
|
||||||
|
({ uintptr_t x; asm ("ld [%%g7+0x14], %0" : "=r" (x)); x; })
|
4
sysdeps/sparc/sparc64/stackguard-macros.h
Normal file
4
sysdeps/sparc/sparc64/stackguard-macros.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define STACK_CHK_GUARD \
|
||||||
|
({ uintptr_t x; asm ("ldx [%%g7+0x28], %0" : "=r" (x)); x; })
|
6
sysdeps/x86_64/stackguard-macros.h
Normal file
6
sysdeps/x86_64/stackguard-macros.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define STACK_CHK_GUARD \
|
||||||
|
({ uintptr_t x; \
|
||||||
|
asm ("mov %%fs:%c1, %0" : "=r" (x) \
|
||||||
|
: "i" (offsetof (tcbhead_t, stack_guard))); x; })
|
Reference in New Issue
Block a user