From owner-freebsd-hackers@freebsd.org Mon Nov 16 14:50:38 2020 Return-Path: Delivered-To: freebsd-hackers@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 ABB0E4689CF for ; Mon, 16 Nov 2020 14:50:38 +0000 (UTC) (envelope-from pjfloyd@wanadoo.fr) Received: from smtp.smtpout.orange.fr (smtp13.smtpout.orange.fr [80.12.242.135]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CZX7K6jgnz3hck for ; Mon, 16 Nov 2020 14:50:37 +0000 (UTC) (envelope-from pjfloyd@wanadoo.fr) Received: from [192.168.1.17] ([2.7.192.66]) by mwinf5d75 with ME id t2qa2300g1SQe2i032qb4p; Mon, 16 Nov 2020 15:50:35 +0100 X-ME-Helo: [192.168.1.17] X-ME-Auth: cGpmbG95ZEB3YW5hZG9vLmZy X-ME-Date: Mon, 16 Nov 2020 15:50:35 +0100 X-ME-IP: 2.7.192.66 Subject: Re: FreeBSD 12.2 extra RW program header To: FreeBSD Hackers References: <8ff8067a-3354-3587-4eda-1aa802f6c86b@wanadoo.fr> From: Paul Floyd Message-ID: <3520fd5a-9b8f-6766-ce6b-4014dc3b4776@wanadoo.fr> Date: Mon, 16 Nov 2020 15:50:33 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4CZX7K6jgnz3hck X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of pjfloyd@wanadoo.fr has no SPF policy when checking 80.12.242.135) smtp.mailfrom=pjfloyd@wanadoo.fr X-Spamd-Result: default: False [-1.96 / 15.00]; FREEMAIL_FROM(0.00)[wanadoo.fr]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.86)[-0.865]; RECEIVED_SPAMHAUS_PBL(0.00)[2.7.192.66:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[wanadoo.fr]; ASN(0.00)[asn:3215, ipnet:80.12.240.0/20, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[80.12.242.135:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[wanadoo.fr]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[80.12.242.135:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[80.12.242.135:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[80.12.242.135:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2020 14:50:38 -0000 On 11/16/20 2:27 PM, Konstantin Belousov wrote: > That's not full details, you stripped readelf output that describes it. > > The first rw data segment is really ro after linking is finished, you can > see that RELRO segment location is identical to the first loadable rw segment. > It contains the following sections typically > .ctors .dtors .dynamic .got > .got (but not .got.plt) is patched by rtld during load. > > I do not remember when did we enabled relro. Most likely long time before 12.1, > and the new segment is due to the way relro handling changed in lld 10. Hi Looking a bit more at the rest of the readelf output I see that there is one RW segement, as you say with .ctors .dtors etc. The added one just seems to have __progname. There are also significant debuginfo changes. Time to go and scratch my head a bit. A+ Paul