diff --git a/ChangeLog.tile b/ChangeLog.tile index 46336a51bf..2ce98e971b 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,3 +1,8 @@ +2012-05-12 Chris Metcalf + + * sysdeps/tile/stackguard-macros.h: New file. + * sysdeps/tile/elf/stackguard-macros.h: New stub include file. + 2012-05-12 Chris Metcalf * sysdeps/tile/Makefile (ELF_MACHINE_PLTREL_OVERLAP): diff --git a/sysdeps/tile/elf/stackguard-macros.h b/sysdeps/tile/elf/stackguard-macros.h new file mode 100644 index 0000000000..606ad58596 --- /dev/null +++ b/sysdeps/tile/elf/stackguard-macros.h @@ -0,0 +1,3 @@ +/* Tests in nptl/ look for while tests + in elf/ look for . Provide both. */ +#include "../stackguard-macros.h" diff --git a/sysdeps/tile/stackguard-macros.h b/sysdeps/tile/stackguard-macros.h new file mode 100644 index 0000000000..7679c0ac00 --- /dev/null +++ b/sysdeps/tile/stackguard-macros.h @@ -0,0 +1,7 @@ +#ifdef __tilegx__ +# define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; }) +#else +# define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; }) +#endif