Date: Wed, 20 Nov 2024 08:00:56 -0700 From: Warner Losh <imp@bsdimp.com> To: John Baldwin <jhb@freebsd.org> Cc: Michal Meloun <mmel@freebsd.org>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, "<dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org> Subject: Re: git: b882d21558f3 - main - arm: link all .rodata variants into one output section Message-ID: <CANCZdfqTzWduH3jvbWRkPK-YfvzSYk94BsfG805jEOS5uoaN_w@mail.gmail.com> In-Reply-To: <a0d4098e-247b-47a7-802e-fa04398a2842@FreeBSD.org> References: <202411171136.4AHBaK2D056199@gitrepo.freebsd.org> <0e6393a7-0624-4a24-8537-60917728ae8a@FreeBSD.org> <2ba6363f-3ff9-451d-8843-6bb6abe6a3ac@FreeBSD.org> <a0d4098e-247b-47a7-802e-fa04398a2842@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <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: Michal Meloun <mmel@FreeBSD.org> > >>> AuthorDate: 2024-11-17 11:28:47 +0000 > >>> Commit: Michal Meloun <mmel@FreeBSD.org> > >>> 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 <div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" = class=3D"gmail_attr">On Wed, Nov 20, 2024, 7:52=E2=80=AFAM John Baldwin <= ;<a href=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>> wrote:<br></div= ><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1= px #ccc solid;padding-left:1ex">On 11/19/24 08:02, Michal Meloun wrote:<br> > <br> > <br> > On 19.11.2024 16:15, John Baldwin wrote:<br> >> On 11/17/24 03:36, Michal Meloun wrote:<br> >>> The branch main has been updated by mmel:<br> >>><br> >>> URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/" rel=3D"n= oreferrer noreferrer" target=3D"_blank">https://cgit.FreeBSD.org/src/commit= /</a>?<br> >>> id=3Db882d21558f37e6a565694ac9b8f2a519e5b86fa<br> >>><br> >>> commit b882d21558f37e6a565694ac9b8f2a519e5b86fa<br> >>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Michal Meloun <mmel@FreeBSD= .org><br> >>> AuthorDate: 2024-11-17 11:28:47 +0000<br> >>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Michal Meloun <mmel@FreeBSD= .org><br> >>> CommitDate: 2024-11-17 11:35:55 +0000<br> >>><br> >>>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 arm: link all .rodata variants = into one output section<br> >>>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 MFC after:=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 1 week<br> >>> ---<br> >>>=C2=A0 =C2=A0 sys/conf/ldscript.arm | 2 +-<br> >>>=C2=A0 =C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)<br> >>><br> >>> diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm<br> >>> index d9edcfac9f78..7cf904ce39ff 100644<br> >>> --- a/sys/conf/ldscript.arm<br> >>> +++ b/sys/conf/ldscript.arm<br> >>> @@ -17,7 +17,7 @@ SECTIONS<br> >>>=C2=A0 =C2=A0=C2=A0=C2=A0 _etext =3D .;<br> >>>=C2=A0 =C2=A0=C2=A0=C2=A0 PROVIDE (etext =3D .);<br> >>>=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<br> >>> -=C2=A0 .rodata=C2=A0=C2=A0=C2=A0 : { *(.rodata) *(.gnu.linkon= ce.r*) }<br> >>> +=C2=A0 .rodata=C2=A0=C2=A0=C2=A0 : { *(.rodata*) *(.gnu.linko= nce.r*) }<br> >>>=C2=A0 =C2=A0=C2=A0=C2=A0 .rodata1=C2=A0=C2=A0 : { *(.rodata1) = }<br> >><br> >> Is this line now spurious or do linker scripts prefer more exact m= atches?<br> >><br> >>>=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 }<br> >>>=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 }<br> >><br> > Right hit. I want write { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) = }<br> > <br> > Warner already tried to tell me the same thing, but I didn't get i= t :(<br> > Btw arm64 has the same problem.<br> > <br> > This gives me another question. Who generates the .rodata1 section? Th= is<br> > section appeared in gnu ld three decades ago, with no real description= .<br> > Do we still need it?<br> <br> I have no idea if we still need .rodata1 (or why it exists), I was just<br> reading the diff of the linker script.<br></blockquote></div></div><div dir= =3D"auto"><br></div><div dir=3D"auto">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.</div><div dir= =3D"auto"><br></div><div dir=3D"auto">Warner</div><div dir=3D"auto"><br></d= iv><div dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quote"= ><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1= px #ccc solid;padding-left:1ex"> John Baldwin<br> <br> </blockquote></div></div></div> --0000000000006bdcd60627596bbc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqTzWduH3jvbWRkPK-YfvzSYk94BsfG805jEOS5uoaN_w>