Messages in this thread | | | From | Roland McGrath <> | Subject | Re: [PATCH 7/9] jump label: sort jump table at build-time | Date | Fri, 9 Apr 2010 14:32:49 -0700 (PDT) |
| |
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
| |