summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/amd64/reloc.c
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1999-04-09 00:28:43 +0000
committerjdp <jdp@FreeBSD.org>1999-04-09 00:28:43 +0000
commite595dd9e791a7eb6b5a7fe22be06e31e5865a8a5 (patch)
tree011da07a2199193b40aa17dcb23e0eee2e7128f2 /libexec/rtld-elf/amd64/reloc.c
parent2034f40c32390dde21785f5701e20bf7c6633adf (diff)
downloadFreeBSD-src-e595dd9e791a7eb6b5a7fe22be06e31e5865a8a5.zip
FreeBSD-src-e595dd9e791a7eb6b5a7fe22be06e31e5865a8a5.tar.gz
Eliminate all machine-dependent code from the main source body and
the Makefile, and move it down into the architecture-specific subdirectories. Eliminate an asm() statement for the i386. Make the dynamic linker work if it is built as an executable instead of as a shared library. See i386/Makefile.inc to find out how to do it. Note, this change is not enabled and it might never be enabled. But it might be useful in the future. Building the dynamic linker as an executable should make it start up faster, because it won't have any relocations. But in practice I suspect the difference is negligible.
Diffstat (limited to 'libexec/rtld-elf/amd64/reloc.c')
-rw-r--r--libexec/rtld-elf/amd64/reloc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c
index d34d892..82c0e8e 100644
--- a/libexec/rtld-elf/amd64/reloc.c
+++ b/libexec/rtld-elf/amd64/reloc.c
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: rtld.c,v 1.3 1998/05/01 08:39:27 dfr Exp $
+ * $Id: reloc.c,v 1.1 1998/09/04 19:03:57 dfr Exp $
*/
/*
@@ -107,6 +107,16 @@ do_copy_relocations(Obj_Entry *dstobj)
return 0;
}
+/* Initialize the special GOT entries. */
+void
+init_pltgot(Obj_Entry *obj)
+{
+ if (obj->pltgot != NULL) {
+ obj->pltgot[1] = (Elf_Addr) obj;
+ obj->pltgot[2] = (Elf_Addr) &_rtld_bind_start;
+ }
+}
+
/* Process the non-PLT relocations. */
int
reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld)
OpenPOWER on IntegriCloud