Date: 24 Nov 1998 22:16:58 -0600 From: Joel Ray Holveck <joelh@gnu.org> To: John Polstra <jdp@polstra.com> Cc: current@FreeBSD.ORG Subject: Re: Elf linker question. Message-ID: <86btlwxv7p.fsf@detlev.UUCP> In-Reply-To: John Polstra's message of "Tue, 24 Nov 1998 16:30:49 -0800 (PST)" References: <XFMail.981124163049.jdp@polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> How are things like: >> sighander_t mysig = libsig; >> handled? > Any time you take the address of a function, the linker actually fills > in the address of a little stub routine. It's the same stub that > gets called when you call an external function. The first time it is > executed, the stub jumps to code in the dynamic linker that does the > lazy binding to whatever function is being called. Then it rewires > itself (an indirect jump is used) so that all future calls will go > straight to the target function. Oh, so it doesn't snap the pointer in the code? It just leaves it pointing to the stub? Thanks, joelh -- Joel Ray Holveck - joelh@gnu.org Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86btlwxv7p.fsf>