Module Name: src Committed By: joerg Date: Thu Apr 30 14:32:05 UTC 2020
Modified Files: src/sys/sys: cdefs_elf.h Log Message: GNU as on ARM silently accepts @progbits, but interpretes it as comment internally. LLVM bails out on the other hand. So conditionally this properly. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/sys/cdefs_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/cdefs_elf.h diff -u src/sys/sys/cdefs_elf.h:1.56 src/sys/sys/cdefs_elf.h:1.57 --- src/sys/sys/cdefs_elf.h:1.56 Fri Apr 17 14:19:44 2020 +++ src/sys/sys/cdefs_elf.h Thu Apr 30 14:32:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs_elf.h,v 1.56 2020/04/17 14:19:44 joerg Exp $ */ +/* $NetBSD: cdefs_elf.h,v 1.57 2020/04/30 14:32:05 joerg Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -134,16 +134,30 @@ _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver)) #endif +#ifdef __arm__ #if __STDC__ -#define __SECTIONSTRING(_sec, _str) \ - __asm(".pushsection " #_sec ",\"MS\",@progbits,1\n" \ +# define __SECTIONSTRING(_sec, _str) \ + __asm(".pushsection " #_sec ",\"MS\",%progbits,1\n" \ + ".asciz \"" _str "\"\n" \ + ".popsection") +#else +# define __SECTIONSTRING(_sec, _str) \ + __asm(".pushsection " _sec ",\"MS\",%progbits,1\n" \ ".asciz \"" _str "\"\n" \ ".popsection") +# endif #else -#define __SECTIONSTRING(_sec, _str) \ +# if __STDC__ +# define __SECTIONSTRING(_sec, _str) \ + __asm(".pushsection " #_sec ",\"MS\",@progbits,1\n" \ + ".asciz \"" _str "\"\n" \ + ".popsection") +# else +# define __SECTIONSTRING(_sec, _str) \ __asm(".pushsection " _sec ",\"MS\",@progbits,1\n" \ ".asciz \"" _str "\"\n" \ ".popsection") +# endif #endif #define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s)