[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56731D32.4040900@zytor.com>
Date: Thu, 17 Dec 2015 12:38:10 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: "Luis R. Rodriguez" <mcgrof@...not-panic.com>, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, konrad.wilk@...cle.com
Cc: rusty@...tcorp.com.au, luto@...capital.net,
boris.ostrovsky@...cle.com, mcb30@...e.org, jgross@...e.com,
JBeulich@...e.com, joro@...tes.org, ryabinin.a.a@...il.com,
andreyknvl@...gle.com, long.wanglong@...wei.com,
qiuxishi@...wei.com, aryabinin@...tuozzo.com,
mchehab@....samsung.com, valentinrothberg@...il.com,
peter.senna@...il.com, mcgrof@...e.com, x86@...nel.org,
xen-devel@...ts.xensource.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC v1 0/8] x86/init: Linux linker tables
I think we can make this even more generic. In particular, I would love
to see a solution for link tables that:
a) can be used for any kind of data structures, not just function
pointers (the latter is a specialization of the former);
b) doesn't need any changes to the linker scripts once the initial
enabling is done for any one architecture.
Key to this is to be able to define tables by name only, which is really
why SORT_BY_NAME() is used: the name sorts before the priority simply by
putting the name before the class.
Instead of .tbl.* naming of sections I think we should have the first
component be the type of section (.rodata, .data, .init_rodata,
.read_mostly etc.) which makes it easier to write a linker script that
properly sorts it into the right section. The other thing is to take a
clue from the implementation in iPXE, which uses priority levels 00 and
99 (or we could use non-integers which sort appropriately instead of
using "real" levels) to contain the start and end symbols, which
eliminates any need for linker script modifications to add new tables.
Making this a generic facility we could eventually eliminate a bunch of
ad hoc hacks we currently have.
Oh, and the link table feature should NOT be x86-specific.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists