From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [RFC v1 0/8] x86/init: Linux linker tables Date: Thu, 21 Jan 2016 16:37:33 -0500 Message-ID: <20160121213732.GG15622@localhost.localdomain> References: <1450217797-19295-1-git-send-email-mcgrof@do-not-panic.com> <56731D32.4040900@zytor.com> <20151217234625.GM20409@wotan.suse.de> <56738AAF.2080601@zytor.com> <56738E29.3070605@zytor.com> <56A13D42.7040500@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: "Luis R. Rodriguez" Cc: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Rusty Russell , Andy Lutomirski , Boris Ostrovsky , mcb30@ipxe.org, Juergen Gross , Jan Beulich , joro@8bytes.org, Andrey Ryabinin , andreyknvl@google.com, long.wanglong@huawei.com, qiuxishi@huawei.com, aryabinin@virtuozzo.com, Mauro Carvalho Chehab , Valentin Rothberg , Peter Senna Tschudin , X86 ML , Michal Marek , "xen-devel@lists.xensource.com" , Michael Matz , "linux-kernel@vger.kernel.org" List-Id: xen-devel@lists.xenproject.org On Thu, Jan 21, 2016 at 12:33:43PM -0800, Luis R. Rodriguez wrote: > On Thu, Jan 21, 2016 at 12:19 PM, H. Peter Anvin wrote: > > On 12/17/15 20:40, H. Peter Anvin wrote: > >>> > >>> const struct > >>> foo__attribute__((used,section(".rodata.tbl.tablename.0"))) tablename[0]; > >>> > >>> const struct > >>> foo__attribute__((used,section(".rodata.tbl.tablename.999"))) > >>> tablename__end[0]; > >>> > > > > (Over)thinking about this some more, I suggest using the empty string > > for the start and "~" for the end. And, yes, I did check that ~ works > > as part of a section name. > > Sure, do we know if that ICC compatible? Do we care? There are a > series of ICC hacks put in place on ipxe's original solution which > I've folded in, it seems that works but if we care about ICC those > folks should perhaps help review as well. I didn't know the kernel could even be compiled with ICC? Thought only GCC worked? Anyhow - it may be that those fixes were for quite old ICC versions. Does the latest one manifest these oddities? > > > Something that confuses me is that gcc seems to give these sections the > > "aw" attributes which makes as complain. This might be a gcc bug. > > Worst case we have to use an assembly statement to create these > > sections; it isn't a big deal and shouldn't make it any more > > architecture-specific. > > OK! > > Luis