Received: by mail.netbsd.org (Postfix, from userid 605) id 3CB9C84E37; Wed, 17 Oct 2018 23:37:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 6465884E35 for ; Wed, 17 Oct 2018 23:36:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id wK_DmCHHTGeW for ; Wed, 17 Oct 2018 23:36:58 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id CAB9284C82 for ; Wed, 17 Oct 2018 23:36:58 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id C3392FBEE; Wed, 17 Oct 2018 23:36:58 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Wed, 17 Oct 2018 23:36:58 +0000 From: "Joerg Sonnenberger" Subject: CVS commit: src/libexec/ld.elf_so To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20181017233658.C3392FBEE@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Joerg Sonnenberger" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: joerg Date: Wed Oct 17 23:36:58 UTC 2018 Modified Files: src/libexec/ld.elf_so: Makefile reloc.c rtld.c rtld.h Added Files: src/libexec/ld.elf_so: compat.c Log Message: Move compatibility for pre-2.0 ELF binaries into separate file. Early ELF binaries defined dlopen and friends in crt0.o by using function pointers in the object handle passed from rtld. This contract wastes space when many shared objects are allocated and ties dynamic linker and rest of the system tightly together. Fake the entry points in a static object and restrict them to the platforms that had working ELF support at the time. Keep the magic and version field used by modern crt0.o for all architectures. The checks will be removed from crt0.o in a follow-up step. To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.139 src/libexec/ld.elf_so/Makefile cvs rdiff -u -r0 -r1.1 src/libexec/ld.elf_so/compat.c cvs rdiff -u -r1.112 -r1.113 src/libexec/ld.elf_so/reloc.c cvs rdiff -u -r1.192 -r1.193 src/libexec/ld.elf_so/rtld.c cvs rdiff -u -r1.133 -r1.134 src/libexec/ld.elf_so/rtld.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.