From 16eb780e13f00c75b55fa8c7b8a9278c62d123fb Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Sun, 22 Sep 2013 09:37:59 +0800 Subject: [PATCH 1/3] Refs #262. Fixed compatibility issues of GNU stack markings with PathScale EKOPath(tm) Compiler Suite: Version 4.0.12.1 --- common_alpha.h | 2 +- common_ia64.h | 2 +- common_mips64.h | 2 +- common_sparc.h | 2 +- common_x86.h | 2 +- common_x86_64.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common_alpha.h b/common_alpha.h index 3b46c74ce..845fb316a 100644 --- a/common_alpha.h +++ b/common_alpha.h @@ -151,7 +151,7 @@ REALNAME: #endif #if defined(__linux__) && defined(__ELF__) -#define GNUSTACK .section .note.GNU-stack,"",%progbits +#define GNUSTACK .section .note.GNU-stack,"",@progbits #else #define GNUSTACK #endif diff --git a/common_ia64.h b/common_ia64.h index 3530e0b1d..79b3c8167 100644 --- a/common_ia64.h +++ b/common_ia64.h @@ -380,7 +380,7 @@ REALNAME: #endif #if defined(__linux__) && defined(__ELF__) -#define GNUSTACK .section .note.GNU-stack,"",%progbits +#define GNUSTACK .section .note.GNU-stack,"",@progbits #else #define GNUSTACK #endif diff --git a/common_mips64.h b/common_mips64.h index c08fb2c75..d9cdc498f 100644 --- a/common_mips64.h +++ b/common_mips64.h @@ -236,7 +236,7 @@ REALNAME: ;\ .set nomacro #if defined(__linux__) && defined(__ELF__) -#define GNUSTACK .section .note.GNU-stack,"",%progbits +#define GNUSTACK .section .note.GNU-stack,"",@progbits #else #define GNUSTACK #endif diff --git a/common_sparc.h b/common_sparc.h index cfd27f768..daa2e49b0 100644 --- a/common_sparc.h +++ b/common_sparc.h @@ -201,7 +201,7 @@ static __inline int blas_quickdivide(blasint x, blasint y){ REALNAME:; #if defined(__linux__) && defined(__ELF__) -#define GNUSTACK .section .note.GNU-stack,"",%progbits +#define GNUSTACK .section .note.GNU-stack,"",@progbits #else #define GNUSTACK #endif diff --git a/common_x86.h b/common_x86.h index 48517d900..5f42843be 100644 --- a/common_x86.h +++ b/common_x86.h @@ -303,7 +303,7 @@ REALNAME: #define EPILOGUE \ .size REALNAME, .-REALNAME; \ - .section .note.GNU-stack,"",%progbits + .section .note.GNU-stack,"",@progbits #endif diff --git a/common_x86_64.h b/common_x86_64.h index 188903848..39e5a5eb1 100644 --- a/common_x86_64.h +++ b/common_x86_64.h @@ -374,7 +374,7 @@ REALNAME: #define EPILOGUE \ .size REALNAME, .-REALNAME; \ - .section .note.GNU-stack,"",%progbits + .section .note.GNU-stack,"",@progbits #endif From ce5626a3841604bf2e9e29a7caf149695c3e3748 Mon Sep 17 00:00:00 2001 From: yieldthought Date: Tue, 8 Oct 2013 16:37:17 +0200 Subject: [PATCH 2/3] Remove -Wl,--retain-symbols-file from dynamic library linking to fix tool support The aim is to restrict the symbols exported from openBLAS, but for dynamic libraries --retain-symbols-file has the opposite effect intended. It removes symbols from the .symtab section of the library, which is used by tools such as debuggers, profilers, objdump etc. but does not remove them from .dynsym, which is the section used by the runtime when loading the binary. In short, using --retain-symbols-file like this doesn't prevent symbol leakage but does prevent tools from analyzing applications linked with openBLAS. This patch improves tool support for openBLAS applications but does not address symbol leakage through .dynsym. --- exports/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exports/Makefile b/exports/Makefile index 1531f3cc1..0bc9ec6e0 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -126,7 +126,7 @@ so : ../$(LIBSONAME) ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ - -Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) + -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) ifneq ($(C_COMPILER), LSB) $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. else @@ -145,7 +145,7 @@ so : ../$(LIBSONAME) ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ - -Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB) + $(FEXTRALIB) $(EXTRALIB) $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. rm -f linktest From beffee7d914702f5b7211d41e3a77cd08d6c4d96 Mon Sep 17 00:00:00 2001 From: wangqian Date: Fri, 11 Oct 2013 03:20:20 +0800 Subject: [PATCH 3/3] Fixed buffer overflow bug in kernel/x86_64/dgemv_t.S file. --- kernel/x86_64/dgemv_t.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/x86_64/dgemv_t.S b/kernel/x86_64/dgemv_t.S index 48b3f17c4..3d132c3b5 100644 --- a/kernel/x86_64/dgemv_t.S +++ b/kernel/x86_64/dgemv_t.S @@ -171,7 +171,7 @@ .L0x: xorq M,M addq $1,M - salq $22,M + salq $21,M subq M,MMM jge .L00