I have also generally thought for dynamic linking something BASE + Address is better for dynamic linking. It pretty simple and quick as you show.
However, I think the reason the for the whole per symbol resolution is, like take a library and it is updated on the system now all your offsets potentially change. You also run into the issue that a symbol may move from one library to an other over time. Plus other things, but that kinda sums up why we have per symbol resolution.
Although, I do like what is being proposed. Although it seems to only work if the number of symbols per library stay the same or are not moved to other libraries. Although, it sounds like they are mainly targeting things considering environment is relatively stable.
Although I guess what is not clear is where the table they generate lives? Sounds like the executable or their own loader?
If a library changed all downstream dependencies of it (applications) in Nix would need to be rebuilt anyways -- that is the cost of the input-addressed (pessimistic) model.
Although I was thinking if it could maybe used more generally. If the table is separate or part of storeld loader that the application uses. Couldn't we also change/update just that table on a system update. The compiled application could still keep the same offsets without recompiling. That keeps updating the table separate from the application loading.
Basically, becomes an ahead of time symbol resolution. Although, you still have the issue if the symbol moved to some other lib I think, and definitely if it was removed.
That's what the thesis tried to generalize as "epochs". All modern day systems have them, whether you are using apt-get or dnf, there is a point in time to do the one-time calculation of offsets.
I have also generally thought for dynamic linking something BASE + Address is better for dynamic linking. It pretty simple and quick as you show.
However, I think the reason the for the whole per symbol resolution is, like take a library and it is updated on the system now all your offsets potentially change. You also run into the issue that a symbol may move from one library to an other over time. Plus other things, but that kinda sums up why we have per symbol resolution.
Although, I do like what is being proposed. Although it seems to only work if the number of symbols per library stay the same or are not moved to other libraries. Although, it sounds like they are mainly targeting things considering environment is relatively stable.
Although I guess what is not clear is where the table they generate lives? Sounds like the executable or their own loader?
If a library changed all downstream dependencies of it (applications) in Nix would need to be rebuilt anyways -- that is the cost of the input-addressed (pessimistic) model.
A perfect fit!
Although I was thinking if it could maybe used more generally. If the table is separate or part of storeld loader that the application uses. Couldn't we also change/update just that table on a system update. The compiled application could still keep the same offsets without recompiling. That keeps updating the table separate from the application loading.
Basically, becomes an ahead of time symbol resolution. Although, you still have the issue if the symbol moved to some other lib I think, and definitely if it was removed.
That's what the thesis tried to generalize as "epochs". All modern day systems have them, whether you are using apt-get or dnf, there is a point in time to do the one-time calculation of offsets.
I suggest going further and just using static linking. It removes so much pain and may improve result performance and decrease program size.