Date: Thu, 11 Nov 2010 19:18:00 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215137 - head/sys/sys Message-ID: <201011111918.oABJI0g2081623@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Thu Nov 11 19:17:59 2010 New Revision: 215137 URL: http://svn.freebsd.org/changeset/base/215137 Log: Revert r103230, which depended on ld preserving the __start_xxx and __stop_xxx symbols for custom sections, even when these were not referenced (at link time). This behaviour was changed again in binutils commit 0b8ed435c3fe8bd09a08c23920e65bfb03251221. This time, put the __GLOBL macro definition in cdefs.h, so it can be reused in a few other places where it will be needed. Reviewed by: kib Modified: head/sys/sys/cdefs.h head/sys/sys/linker_set.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Nov 11 19:13:16 2010 (r215136) +++ head/sys/sys/cdefs.h Thu Nov 11 19:17:59 2010 (r215137) @@ -401,6 +401,9 @@ #endif /* __STDC__ */ #endif /* __GNUC__ || __INTEL_COMPILER */ +#define __GLOBL1(sym) __asm__(".globl " #sym) +#define __GLOBL(sym) __GLOBL1(sym) + #if defined(__GNUC__) || defined(__INTEL_COMPILER) #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") #else Modified: head/sys/sys/linker_set.h ============================================================================== --- head/sys/sys/linker_set.h Thu Nov 11 19:13:16 2010 (r215136) +++ head/sys/sys/linker_set.h Thu Nov 11 19:17:59 2010 (r215137) @@ -45,6 +45,8 @@ */ #ifdef __GNUCLIKE___SECTION #define __MAKE_SET(set, sym) \ + __GLOBL(__CONCAT(__start_set_,set)); \ + __GLOBL(__CONCAT(__stop_set_,set)); \ static void const * const __set_##set##_sym_##sym \ __section("set_" #set) __used = &sym #else /* !__GNUCLIKE___SECTION */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011111918.oABJI0g2081623>