From 787d8d240bbeaa812bcf37deeedb3c467be468a3 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 19 May 2018 17:31:42 +0100 Subject: __warn_references: tweak assembly for "gnu.warning" section On some targets ';' (like hppa) is treated as a comment in assembly files. This occasionally causes the following assembly failures: ``` Error: can't resolve `.gnu.warning.EVP_DecryptFinal' {.gnu.warning.EVP_DecryptFinal section} - `.Ltext0' {.text section} ``` Note how branch (or other reference) attempts to cross the boundary across two section types: '.text' and '.gnu.warning'. Tobias Ulmer notes that openbsd already uses newlines for similar macro: https://github.com/openbsd/src/blob/master/sys/arch/hppa/include/cdefs.h This change switches from ';' to newline as well. Tested on hppa2.0 and x86_64. Reported-by: Jeroen Roovers Bug: https://bugs.gentoo.org/656104 Signed-off-by: Sergei Trofimovich --- include/compat/sys/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/compat/sys/types.h b/include/compat/sys/types.h index 2107119..dec09e3 100644 --- a/include/compat/sys/types.h +++ b/include/compat/sys/types.h @@ -62,7 +62,7 @@ typedef SSIZE_T ssize_t; #if defined(__GNUC__) && defined (HAS_GNU_WARNING_LONG) #define __warn_references(sym,msg) \ __asm__(".section .gnu.warning." __STRING(sym) \ - " ; .ascii \"" msg "\" ; .text"); + "\n\t.ascii \"" msg "\"\n\t.text"); #else #define __warn_references(sym,msg) #endif -- cgit v1.2.3-55-g6feb