Date: Wed, 20 Nov 2024 08:03:24 -0800 From: Mark Millard <marklmi@yahoo.com> To: mmel@freebsd.org, John Baldwin <jhb@freebsd.org>, dev-commits-src-main@freebsd.org Cc: Warner Losh <imp@bsdimp.com> Subject: Re: git: b882d21558f3 - main - arm: link all .rodata variants into one output section Message-ID: <6088B065-8BA0-4D0B-8E08-706B634D5D91@yahoo.com> References: <6088B065-8BA0-4D0B-8E08-706B634D5D91.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin <jhb_at_FreeBSD.org> wrote on Date: Wed, 20 Nov 2024 14:52:06 UTC : > On 11/19/24 08:02, Michal Meloun wrote: > >=20 > >=20 > > 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*) } > >=20 > > Warner already tried to tell me the same thing, but I didn't get it = :( > > Btw arm64 has the same problem. > >=20 > > This gives me another question. Who generates the .rodata1 section? = This > > section appeared in gnu ld three decades ago, with no real = description. > > Do we still need it? >=20 > I have no idea if we still need .rodata1 (or why it exists), I was = just > reading the diff of the linker script. Looking around at examples on the web I'm seeing mostly the likes of the following for analogous text: .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } .rodata1 : { *(.rodata1) } (and somewhat similarly for .data.*) I saw some examples of *(.rodata.str1.4) for examples that lacked use of .rodata.* , giving some idea what would be expected to match the .* part of the pattern. =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6088B065-8BA0-4D0B-8E08-706B634D5D91>