[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4AC520F9.8000201@natemccallum.com>
Date: Thu, 01 Oct 2009 17:36:57 -0400
From: Nathaniel McCallum <nathaniel@...emccallum.com>
To: Greg KH <greg@...ah.com>
CC: linux-kernel@...r.kernel.org
Subject: Re: Exposing device ids and driver names
On 10/01/2009 02:40 PM, Greg KH wrote:
> On Thu, Oct 01, 2009 at 02:35:40PM -0400, Nathaniel McCallum wrote:
>> But I still would prefer a non-invasive solution.
>
> Agreed, sorry I don't have an idea on how to do it.
How about this?
-#define MODULE_GENERIC_TABLE(gtype,name)
+#define MODULE_GENERIC_TABLE(gtype,name) \
+static const struct gtype##_id gtype##_id_table \
+ __attribute__ ((unused, alias(__stringify(name))))
We add an alias to the existing symbol. This just creates a new entry
in the symbol table. These entries are all stripped anyway and inserted
into the System.map.
Impact:
* No change to the resulting vmlinuz binary
* Increases size of System.map (~2k with the Fedora config)
Nathaniel
--
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