Date: Mon, 30 Jun 2014 14:37:08 -0400 From: John Baldwin <jhb@freebsd.org> To: Hans Petter Selasky <hselasky@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r268055 - head/sys/sys Message-ID: <201406301437.08687.jhb@freebsd.org> In-Reply-To: <201406301811.s5UIBMxh036571@svn.freebsd.org> References: <201406301811.s5UIBMxh036571@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, June 30, 2014 2:11:22 pm Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Jun 30 18:11:22 2014 > New Revision: 268055 > URL: http://svnweb.freebsd.org/changeset/base/268055 > > Log: > Workaround for bug in GCC on powerpc64. Symbols that are exported are > by fault required to be all "static" or all "extern". > > Modified: > head/sys/sys/linker_set.h > > Modified: head/sys/sys/linker_set.h > ============================================================================== > --- head/sys/sys/linker_set.h Mon Jun 30 17:04:55 2014 (r268054) > +++ head/sys/sys/linker_set.h Mon Jun 30 18:11:22 2014 (r268055) > @@ -40,15 +40,26 @@ > * For ELF, this is done by constructing a separate segment for each set. > */ > > +#if defined(__powerpc64__) > +/* > + * Move the symbol pointer from ".text" to ".data" segment, to make > + * the GCC compiler happy: > + */ > +#define __MAKE_SET_CONST > +#else > +#define __MAKE_SET_CONST const > +#endif > + > /* > * Private macros, not to be used outside this header file. > */ > #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 > +#define __MAKE_SET(set, sym) \ > + __GLOBL(__CONCAT(__start_set_,set)); \ > + __GLOBL(__CONCAT(__stop_set_,set)); \ > + static void const * __MAKE_SET_CONST \ > + __set_##set##_sym_##sym __section("set_" #set) \ > + __used = &(sym) Reindenting the whitespace made this diff harder to read. Why hasn't this been a problem before on powerpc64? -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406301437.08687.jhb>