From owner-svn-src-head@freebsd.org Thu May 21 16:03:46 2020 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 B09E52DD01E; Thu, 21 May 2020 16:03:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49SZDL4KqCz3gwK; Thu, 21 May 2020 16:03:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:c7d:9a4b:586:998a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id E55E719760; Thu, 21 May 2020 16:03:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r361303 - in head: lib/libc/gen libexec/rtld-elf sys/sys To: Mark Johnston , Konstantin Belousov Cc: Antoine Brodin , src-committers , svn-src-all , svn-src-head@freebsd.org References: <202005202208.04KM8QPA020707@repo.freebsd.org> <20200521134152.GE64045@kib.kiev.ua> <20200521151248.GA85681@raichu> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+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4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Thu, 21 May 2020 09:03:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200521151248.GA85681@raichu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 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: Thu, 21 May 2020 16:03:46 -0000 On 5/21/20 8:12 AM, Mark Johnston wrote: > On Thu, May 21, 2020 at 04:41:52PM +0300, Konstantin Belousov wrote: >> On Thu, May 21, 2020 at 03:02:07PM +0200, Antoine Brodin wrote: >>> On Thu, May 21, 2020 at 12:08 AM Konstantin Belousov wrote: >>>> >>>> Author: kib >>>> Date: Wed May 20 22:08:26 2020 >>>> New Revision: 361303 >>>> URL: https://svnweb.freebsd.org/changeset/base/361303 >>>> >>>> Log: >>>> Change the samantic of struct link_map l_addr member. >>>> >>>> It previously returned the object map base address, while all other >>>> ELF operating systems return load offset, i.e. the difference between >>>> map base and the link base. >>>> >>>> Explain the meaning of the field in the man page. >>>> >>>> Stop filling the mips-only l_offs member, which is apparently unused. >>>> >>>> PR: 246561 >>>> Requested by: Damjan Jovanovic >>>> Reviewed by: emaste, jhb, cem (previous version) >>>> Sponsored by: The FreeBSD Foundation >>>> MFC after: 1 week >>>> Differential revision: https://reviews.freebsd.org/D24918 >>>> >>>> Modified: >>>> head/lib/libc/gen/dlinfo.3 >>>> head/libexec/rtld-elf/rtld.c >>>> head/sys/sys/link_elf.h >>> >>> Hi, >>> >>> After this commit, some ports fail to build with signal 11. >>> For instance lang/perl5.30 fails to build with default options (DTRACE on) >>> Disabling the DTRACE option makes it able to build again. >>> >> I see, thank you for reporting. >> >> So drti.c:dtrace_dof_init() does read l_addr, and the dtrace code assumes >> that l_addr is the base, not relocbase. >> >> Mark, was dofhp_addr initialization changed comparing to Solaris ? > > It appears it has been the same since DTrace was imported. illumos > still has similar code. > > Note that drti.o is linked into any executable and shlib that defines > static probes, so the ABI change affects more than just dtrace(1). > Would it be possible to define a new value for RTLD_DI_LINKMAP, and > preserve the old behaviour for the old value? I think a bigger question is if Solaris/illumos treat l_addr as mapbase (absolute address) or relocbase (relative address). In the discussion in the phabricator I had assumed that all other OS's treated l_addr as the relative offset (relocbase). Does the code for illumos assume an absolute address or does it assume a relative address in l_addr? -- John Baldwin