From nobody Wed Nov 20 15:00:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xtl1N4Yyyz5dN3L for ; Wed, 20 Nov 2024 15:01:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtl1N2k6Wz46PQ for ; Wed, 20 Nov 2024 15:01:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2ea4e9e6ef2so3007772a91.1 for ; Wed, 20 Nov 2024 07:01:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1732114870; x=1732719670; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bVuUwjcQohvT4tMsT3ORE64eixRJ+MqDTOu4Sfxj+BA=; b=yDIIJb+sRDaYGq2JnufAuXJ0QUuU7wldHGdEh/dc+ONjHVuHCcaS1GsLxOVDoTYTQc 7rOMHucfw7qFPPkAGg0WwjZNhOPV0zCi9h6NtozwmD0zyRObs2U8OtDPcZBQPnfNhcvL Bn85oRs2xHZV4CNRP+8IBKaiBMhhlZNncCZ/NCg4qPPLxfgHUnAQ8HJTGAPY4DV8uox8 F002EWQ/dw43l0MZMPcToIa64u05EVGINDYdUhrtqRjK8OUEQrjl9W9vc+S0QrmTfwoe mVmvQHAVsNDfgqzRptg4L9lDVzGnwVm36N6uWLTecw3RaqiFEu8WMN8TdZh95VGsqOQS ut6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732114870; x=1732719670; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bVuUwjcQohvT4tMsT3ORE64eixRJ+MqDTOu4Sfxj+BA=; b=cBrtsFJxCL8m32fA2OmscACs4tUqNkaxBMr0V6QUg2/+oKowkuW4eQ1KoppCBAjMu9 aGiIKu40sqJzpinFvoDRhFjp0yIxtGRDuMATFsIve05ckauOyu113a+rYalLlEfymsRS pUuTLmqMqxfYaDansn/uibOdtJCf1gHbgXBEV/QdeeU3x6gBFkyDC/WrPULKtgfMDdZ7 qYs2lLajkugOBWpDKs8Wt+IIDehQ9vmhgro2nSikgM9e5GhBqsoY4QPL/1tbxE3gVQEl 1DttztCGQQYAzO+/23oD56seVFrDIa6kc+usPsqnG+URTw03w7R7QqDCakYytAPLvMBp iiQw== X-Forwarded-Encrypted: i=1; AJvYcCXvNruQW2g8rXxCJZ+ct+vVgbTnDpYu52bya/1RNMe9wKqTcMLa9k3TXomdWv3DJpsbnj+QRe6GTPIiCNvQZu4EV0vK@freebsd.org X-Gm-Message-State: AOJu0Ywy5qMUl7xWi/MrvcdIGaB7jcwCDVidFLMY6PR9cg/iQgyTfUfb nunGn9AOK3Csw7/IWZpr2VvNWQZxQh4PgJ+euM3/s/bscrFnYDiu3AdPvNjXmpreHJzwm3jlMiG aELkcNRJACSl/yEBD3AD3GaHRZNSRUTA7Coq6/w== X-Google-Smtp-Source: AGHT+IEt+91hVCzTq0qUoMdvoPSD0ZuDYqvgmlxcNE3tiRClsIDFckn8HlbHAqSSr8/IAZ1nGiCuU9s4cZByrJlxwtw= X-Received: by 2002:a17:90a:d40e:b0:2ea:4578:46d8 with SMTP id 98e67ed59e1d1-2eaca6fdc48mr3781906a91.9.1732114868060; Wed, 20 Nov 2024 07:01:08 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202411171136.4AHBaK2D056199@gitrepo.freebsd.org> <0e6393a7-0624-4a24-8537-60917728ae8a@FreeBSD.org> <2ba6363f-3ff9-451d-8843-6bb6abe6a3ac@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Wed, 20 Nov 2024 08:00:56 -0700 Message-ID: Subject: Re: git: b882d21558f3 - main - arm: link all .rodata variants into one output section To: John Baldwin Cc: Michal Meloun , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000006bdcd60627596bbc" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Xtl1N2k6Wz46PQ X-Spamd-Bar: ---- --0000000000006bdcd60627596bbc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 20, 2024, 7:52=E2=80=AFAM John Baldwin wrote: > On 11/19/24 08:02, Michal Meloun wrote: > > > > > > On 19.11.2024 16:15, John Baldwin wrote: > >> On 11/17/24 03:36, Michal Meloun wrote: > >>> The branch main has been updated by mmel: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/? > >>> id=3Db882d21558f37e6a565694ac9b8f2a519e5b86fa > >>> > >>> commit b882d21558f37e6a565694ac9b8f2a519e5b86fa > >>> Author: Michal Meloun > >>> AuthorDate: 2024-11-17 11:28:47 +0000 > >>> Commit: Michal Meloun > >>> CommitDate: 2024-11-17 11:35:55 +0000 > >>> > >>> arm: link all .rodata variants into one output section > >>> MFC after: 1 week > >>> --- > >>> sys/conf/ldscript.arm | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm > >>> index d9edcfac9f78..7cf904ce39ff 100644 > >>> --- a/sys/conf/ldscript.arm > >>> +++ b/sys/conf/ldscript.arm > >>> @@ -17,7 +17,7 @@ SECTIONS > >>> _etext =3D .; > >>> PROVIDE (etext =3D .); > >>> .fini : { *(.fini) } =3D0x9090 > >>> - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } > >>> + .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } > >>> .rodata1 : { *(.rodata1) } > >> > >> Is this line now spurious or do linker scripts prefer more exact > matches? > >> > >>> .interp : { *(.interp) } > >>> .hash : { *(.hash) } > >> > > Right hit. I want write { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } > > > > Warner already tried to tell me the same thing, but I didn't get it :( > > Btw arm64 has the same problem. > > > > This gives me another question. Who generates the .rodata1 section? Thi= s > > section appeared in gnu ld three decades ago, with no real description. > > Do we still need it? > > I have no idea if we still need .rodata1 (or why it exists), I was just > reading the diff of the linker script. > It's primarily for embedded systems that need checksums, at least accordingto Google. I've not seen it generated in any unix... I don't even know why we have it. Warner John Baldwin > > --0000000000006bdcd60627596bbc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Nov 20, 2024, 7:52=E2=80=AFAM John Baldwin <= ;jhb@freebsd.org> wrote:
On 11/19/24 08:02, Michal Meloun wrote:
>
>
> On 19.11.2024 16:15, John Baldwin wrote:
>> On 11/17/24 03:36, Michal Meloun wrote:
>>> The branch main has been updated by mmel:
>>>
>>> URL: https://cgit.FreeBSD.org/src/commit= /?
>>> id=3Db882d21558f37e6a565694ac9b8f2a519e5b86fa
>>>
>>> commit b882d21558f37e6a565694ac9b8f2a519e5b86fa
>>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Michal Meloun <mmel@FreeBSD= .org>
>>> AuthorDate: 2024-11-17 11:28:47 +0000
>>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Michal Meloun <mmel@FreeBSD= .org>
>>> CommitDate: 2024-11-17 11:35:55 +0000
>>>
>>>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 arm: link all .rodata variants = into one output section
>>>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 MFC after:=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 1 week
>>> ---
>>>=C2=A0 =C2=A0 sys/conf/ldscript.arm | 2 +-
>>>=C2=A0 =C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm
>>> index d9edcfac9f78..7cf904ce39ff 100644
>>> --- a/sys/conf/ldscript.arm
>>> +++ b/sys/conf/ldscript.arm
>>> @@ -17,7 +17,7 @@ SECTIONS
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 _etext =3D .;
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 PROVIDE (etext =3D .);
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 .fini=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 := { *(.fini)=C2=A0=C2=A0=C2=A0 } =3D0x9090
>>> -=C2=A0 .rodata=C2=A0=C2=A0=C2=A0 : { *(.rodata) *(.gnu.linkon= ce.r*) }
>>> +=C2=A0 .rodata=C2=A0=C2=A0=C2=A0 : { *(.rodata*) *(.gnu.linko= nce.r*) }
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 .rodata1=C2=A0=C2=A0 : { *(.rodata1) = }
>>
>> Is this line now spurious or do linker scripts prefer more exact m= atches?
>>
>>>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 .interp=C2=A0=C2=A0=C2=A0=C2=A0= : { *(.interp)=C2=A0=C2=A0=C2=A0=C2=A0 }
>>>=C2=A0 =C2=A0=C2=A0=C2=A0 .hash=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 : { *(.hash)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 }
>>
> Right hit. I want write { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) = }
>
> Warner already tried to tell me the same thing, but I didn't get i= t :(
> Btw arm64 has the same problem.
>
> This gives me another question. Who generates the .rodata1 section? Th= is
> section appeared in gnu ld three decades ago, with no real description= .
> Do we still need it?

I have no idea if we still need .rodata1 (or why it exists), I was just
reading the diff of the linker script.

It's primarily for embedded syste= ms that need checksums, at least accordingto Google. I've not seen it g= enerated in any unix... I don't even know why we have it.

Warner


John Baldwin

--0000000000006bdcd60627596bbc--