On 2022-02-11 2:07 p.m., Florian Weimer wrote: >> Loading dp using from _rtld_local doesn't work till relocations are >> done.  Is there a way to compute main_map earlier? > You shouldn't need main_map for this. The link editor computes the > DT_PLTGOT and therefore knows the correct (relative) address. Your are correct.  The link editor does define the symbol $global$ at the start of the PLTGOT. However, I couldn't find a way to load its address without rummaging through the symbol table of main.  This is less efficient than using the PLTGOT value from the ELF header and main_map. I committed the attached change.  It doesn't need a new hook. Thanks, Dave -- John David Anglin dave.anglin@bell.net