Re: [PATCH 7/9] jump label: sort jump table at build-time

From: Roland McGrath
Date: Fri Apr 09 2010 - 17:33:26 EST


I think it just happens to come out harmless. The relocs.c extraction
stuff doesn't actually care about the exact address to be relocated, it
only needs to know that a relocated value sits at a given place in the
binary. The sorting rearranges the addresses in the text without
rearranging their corresponding relocs, but it's still the case that at
exactly each of those spots in text there is a relocated address. The
boot-time "relocation" is just a blind adjustment to all those spots,
without reference to the original relocation details. So it Just Works.
I'm not at all sure this is how we want things to be. It's rather
nonobvious and fragile if we change any of the related magic. But I think
it is entirely reliable in today's code that it will do the right thing.


Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/