From owner-svn-src-head@freebsd.org Mon Sep 23 19:06:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39E35FCC40; Mon, 23 Sep 2019 19:06:35 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46cYhW0lHcz4NfX; Mon, 23 Sep 2019 19:06:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd2f.google.com with SMTP id q1so36246016ion.1; Mon, 23 Sep 2019 12:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bdyHVvLc7crOreWOOY+cpNtNH1bJfGpGh5Auck+zrKk=; b=Ll3rGFaBhQGQ0h6BcAcqHcLhfKyPVqf1z6q+GqsKy1d/NYVX/qf+XGNid+C1M4T5G7 5Ird81imo5DNBDvMmybM4DbgxCIDpxds7T0lO/eo1/cuA6EFpIEc9XPg9VC7272Rduax 4M1SpUw8ZL/RB5jwkZXNRukJgkyfvdgZLqc7ygDuPcVFVuRj4euSNlM7dZvwutfTOdQZ 4pCOXt1R36oqA8D8FR85viPWfyScv49jjNRmLs5pYup3dWnGFlyWOuQ4gbkFT9ybCxyf 24/cJ4XOOLnrb863Ibh4CwfJGj0193vy72RazBS54sReLZTxCgpMxx/qDqfQQBSXvqrK a7vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=bdyHVvLc7crOreWOOY+cpNtNH1bJfGpGh5Auck+zrKk=; b=KxKHJ4kEavVHrsKWQl3Bvsg9Hp/WEQ05+Uvm+f7ktMSkXmUYT40c3nRn21FzegzyF7 VPEhLd0PcJiLLhHtaMzhsE/Jw5NzHNFfAmEVUNu5Yt/V0SEn9GoreGyNdapgIhdaYPcz aiaeLuwVxKi90tG2vxH4hazX++w7Glie3McDr962oeOCP7DjgTAt1R0KGMqXeAHvawpy Y4tpReZcpFPZM6MFs8CODbw8WrZW1nI5WpqFl50x7QFciJDPkdDRda2lV/CdLpfJfqc2 oZe2v595+aUDq5vhg3iwL/AMPN9s2DGxSEBbCQNGElCGKiy4minMbkzlI0nnOXni4fUC oj4g== X-Gm-Message-State: APjAAAVQb00/0mDn81k3i18CQF8slO7azDdeddy/33njSIKspHFqvJ+0 emZFKfNsy6flYeIt4b9OEvgzyNRr X-Google-Smtp-Source: APXvYqy8JtXu5T+TceUHE8L5kbN7oXKlXVt2AZUvhBIq/0TglGJoKhxRTxA5eBnoxU6RW/UlhqmDnA== X-Received: by 2002:a02:a617:: with SMTP id c23mr1099956jam.14.1569265592810; Mon, 23 Sep 2019 12:06:32 -0700 (PDT) Received: from raichu (toroon0560w-lp140-01-69-159-39-167.dsl.bell.ca. [69.159.39.167]) by smtp.gmail.com with ESMTPSA id g8sm8811110ioc.0.2019.09.23.12.06.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 12:06:32 -0700 (PDT) Sender: Mark Johnston Date: Mon, 23 Sep 2019 15:06:29 -0400 From: Mark Johnston To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r352623 - in head/sys: amd64/amd64 kern Message-ID: <20190923190629.GD15061@raichu> References: <201909231414.x8NEEh9e040728@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Rspamd-Queue-Id: 46cYhW0lHcz4NfX X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2019 19:06:35 -0000 On Mon, Sep 23, 2019 at 11:28:52AM -0700, Conrad Meyer wrote: > Hi Mark, > > On Mon, Sep 23, 2019 at 7:14 AM Mark Johnston wrote: > > > > Author: markj > > Date: Mon Sep 23 14:14:43 2019 > > New Revision: 352623 > > URL: https://svnweb.freebsd.org/changeset/base/352623 > > > > Log: > > Use elf_relocaddr() when handling R_X86_64_RELATIVE relocations. > > > > This is required for DPCPU and VNET data variable definitions to work when > > KLDs are linked as DSOs. R_X86_64_RELATIVE relocations should not appear > > in object files, so assert this in elf_relocaddr(). > > Is the goal to eventually link amd64 KLDs as DSOs? I might be > confusing the terminology, but I believe amd64 .ko's today are > unlinked ordinary object files, rather than shared objects. (I > believe they use kern/link_elf_obj.c rather than kern/link_elf.c > today.) > > If so: great! That's right, and that is indeed my goal. At least, I would like to make the option available; with my patch set, it is possible to specify the format at both the per-module and global levels. There are several in-tree modules (some of the HighPoint RAID drivers, if you're curious) that cannot be linked as DSOs because they contain a non-PIC blob, and for now lld refuses to link them into a DSO.