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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/