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
This commit is contained in:
Dimitry Andric 2010-11-11 19:17:59 +00:00
parent 37e13fa27f
commit 566af50bd2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215137
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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 */