Closed smeenai closed 4 months ago
I think "resolves to the current dynamic shared object" conveys the same meaning: rtld binds the symbol reference to the current DSO.
Hmm. I was thinking about this from the perspective of the static linker, since it'll be the one emitting RELATIVE vs. GLOB_DAT as an optimization (the context of the sentence). I guess a better wording for the entire sentence from that perspective would be:
This relocation represents an optimization; it can be used to replace
R_<CLS>_GLOB_DAT
when the symbol ~resolves to~ is defined in the current dynamic shared object and is not pre-emptable.
You're right from the rtld perspective, but I don't understand the optimization discussion from that perspective. The static linker is the one deciding what relocation type to emit, and rtld is just acting on it, right?
Thanks, I updated the wording with your suggestion. I also updated the PR title and description to match the commit, because I wasn't sure which one would be ultimately used.
Can we merge this now? :)
Yes :) As per @smithp35's previous comments.
The optimization is applied by the static linker, so we should reword the sentence from that perspective. Thanks to @smithp35 for suggesting the wording.