From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by sourceware.org (Postfix) with ESMTPS id CB0763858C2A for ; Fri, 19 Jan 2024 21:07:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB0763858C2A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CB0763858C2A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705698465; cv=none; b=r99Ln26nxzYseAGKQr4gcv8vlMrKE4GMv2RWnhGN+2wHBEZ9Jsjjs3HyW3/JKlm0k7NOa3qkfpLkJjPot7neSvwFCtrPUkllMUcW0AuLom6HD3KX9wzzFXtEujgHdFz4eEKoescfbIUZpdWf5ZgFjA6LsPZXkFiOtxPH3NWlZVE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705698465; c=relaxed/simple; bh=LCu0q0pZgRrU98Gem3QVsKAAHcqxcyZ78n5S+OfAovk=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=ajv5q2jA2qBEoafV7BsTmV5sykjfWiyGjhsKxWOa1ej/VYtUv4s5GcozhPRhDgd0b6v1jcGbkh9ZvbrHmMsRvLSahOSF6G8uv3UvScxsDv+5PLSFWMSon8cNDzy/jGJbp0LaoBLPxOc/PEkC/tWvhzACALbjbJZophOPF97ASH0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-210aaf2af35so766650fac.2 for ; Fri, 19 Jan 2024 13:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705698461; x=1706303261; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vrPzGJBVr5pIHouAcV0bhJmQAc+rij/wyFuAv9uhB8g=; b=RYQk60n6rWOn+rk7lCYEmMguagMODQBj492ZhwYcBLC4lkAdzmH8QQTCeo/Nis+hB5 mgFEj4ckEqo/D6FgNrPszeamNGFF8A6q/1MXFll48eQbhn95di3z8BrRPZkG4vXMcNK+ UlAvWjw+SGjVhuZKlu1UwRk5wPjuAJwyclcanarU96QT9pTzMNyMSiKJ9Qm8/EaXn0IX 6Lm5HSmCFiwjY0XMpNOQkt/4cNmxiBr3m44UCG/jQrazMetTEEFF6qsdBJ1z1oolUu9W jyVSl4MpDfeHkzKNCrtv991ZZHcg96GovaXfNEgU4Q5f7I4xLqMXRYbKOcrN8+r8T8/h D5bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705698461; x=1706303261; h=content-transfer-encoding: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=vrPzGJBVr5pIHouAcV0bhJmQAc+rij/wyFuAv9uhB8g=; b=AcSBbEi8A1+8o92+zFN1hR1qWYMjYpldwp+O7ZYqe+lQB9hIHYih+8N4zJy9b1nbxf 7BtntGzKxHRnVbLBGGQywCSwZ3xiUVYL4vlH5cdYongY8uEUG2GAJIQxqy9sX1SZ2n7a yWyAYuD4KSvo5PVUKTDCG/1N7RkEeAK4zTzuPJCE/zlft0Va00BxW6ONxFXsHdLaZjL5 4bvZShyxwnooLMaNHOrrHGI4Opo8y7byuPRGlOOW6LELbfiNHPd87LWoNxMg7PaNQih9 rvRyIeKu419ro68k1VgoNhHV0ZPU0mb2VJ3T8aRw1MZODEWBFQ4pVGsyf94nECu2BPQ6 4O2w== X-Gm-Message-State: AOJu0YzktZoY4yzfs6PfoF7StP1/8Ihndi2sl06WouTo236g8tzqKo6J ehweqsDFn2zv7LBsI0mt9HdsO3/9QQt6wbA/Ib27DJgRbawvJR24kOuuABoqVf56FdDiE7z8UoH 1f6ldxAA25xrgneHfpO/vU0m4a0o7BQsd X-Google-Smtp-Source: AGHT+IEp3HVMxTRRXGckAJzKRgk+pp6FzawIpv+xQ/DEu6LcR/4h1c6eEFxcE1IVyw/QSp6sT/JZmYahwPLZkY77PEM= X-Received: by 2002:a05:6870:fb8e:b0:206:85a2:643b with SMTP id kv14-20020a056870fb8e00b0020685a2643bmr406994oab.35.1705698460723; Fri, 19 Jan 2024 13:07:40 -0800 (PST) MIME-Version: 1.0 References: <20240119194552.1255481-1-hjl.tools@gmail.com> <20240119194552.1255481-3-hjl.tools@gmail.com> In-Reply-To: From: Noah Goldstein Date: Fri, 19 Jan 2024 21:07:28 +0000 Message-ID: Subject: Re: [PATCH 2/4] ld: Include the text section order file in all ELF linker scripts To: "H.J. Lu" Cc: binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Jan 19, 2024 at 8:41=E2=80=AFPM H.J. Lu wrote= : > > On Fri, Jan 19, 2024 at 12:39=E2=80=AFPM Noah Goldstein wrote: > > > > On Fri, Jan 19, 2024 at 8:18=E2=80=AFPM H.J. Lu w= rote: > > > > > > On Fri, Jan 19, 2024 at 12:01=E2=80=AFPM Noah Goldstein wrote: > > > > > > > > On Fri, Jan 19, 2024 at 7:45=E2=80=AFPM H.J. Lu wrote: > > > > > > > > > > Include the text section order file in all ELF linker scripts and= enable > > > > > --text-section-ordering-file tests for all ELF targets. > > > > > > > > > > * scripttempl/avr.sc: Include the text section order file= . > > > > > * scripttempl/dlx.sc: Likewise. > > > > > * scripttempl/elf32cr16.sc: Likewise. > > > > > * scripttempl/elf32crx.sc: Likewise. > > > > > * scripttempl/elf32msp430.sc: Likewise. > > > > > * scripttempl/elf64bpf.sc: Likewise. > > > > > * scripttempl/elf64hppa.sc: Likewise. > > > > > * scripttempl/elfarc.sc: Likewise. > > > > > * scripttempl/elfarcv2.sc: Likewise. > > > > > * scripttempl/elfd10v.sc: Likewise. > > > > > * scripttempl/elfd30v.sc: Likewise. > > > > > * scripttempl/elfm68hc11.sc: Likewise. > > > > > * scripttempl/elfm68hc12.sc: Likewise. > > > > > * scripttempl/elfm9s12z.sc: Likewise. > > > > > * scripttempl/elfmicroblaze.sc: Likewise. > > > > > * scripttempl/elfxgate.sc: Likewise. > > > > > * scripttempl/elfxtensa.sc: Likewise. > > > > > * scripttempl/ft32.sc: Likewise. > > > > > * scripttempl/iq2000.sc: Likewise. > > > > > * scripttempl/mep.sc: Likewise. > > > > > * scripttempl/mmo.sc: Likewise. > > > > > * scripttempl/pru.sc: Likewise. > > > > > * scripttempl/v850.sc: Likewise. > > > > > * scripttempl/v850_rh850.sc: Likewise. > > > > > * scripttempl/visium.sc: Likewise. > > > > > * scripttempl/xstormy16.sc: Likewise. > > > > > * scripttempl/arclinux.sc: Include the text section order= file > > > > > and place code text sections toward the end. > > > > > * scripttempl/elf64bpf.sc: Likewise. > > > > > * scripttempl/nds32elf.sc: Likewise. > > > > > * testsuite/ld-scripts/text-order-1a.d: Remove xfail. > > > > > * testsuite/ld-scripts/text-order-1b.d: Likewise. > > > > > * testsuite/ld-scripts/text-order-1c.d: Likewise. > > > > > --- > > > > > ld/scripttempl/arclinux.sc | 5 +++-- > > > > > ld/scripttempl/avr.sc | 1 + > > > > > ld/scripttempl/dlx.sc | 1 + > > > > > ld/scripttempl/elf32cr16.sc | 1 + > > > > > ld/scripttempl/elf32crx.sc | 1 + > > > > > ld/scripttempl/elf32msp430.sc | 1 + > > > > > ld/scripttempl/elf64bpf.sc | 5 +++-- > > > > > ld/scripttempl/elf64hppa.sc | 1 + > > > > > ld/scripttempl/elfarc.sc | 1 + > > > > > ld/scripttempl/elfarcv2.sc | 1 + > > > > > ld/scripttempl/elfd10v.sc | 1 + > > > > > ld/scripttempl/elfd30v.sc | 1 + > > > > > ld/scripttempl/elfm68hc11.sc | 1 + > > > > > ld/scripttempl/elfm68hc12.sc | 1 + > > > > > ld/scripttempl/elfm9s12z.sc | 1 + > > > > > ld/scripttempl/elfmicroblaze.sc | 1 + > > > > > ld/scripttempl/elfxgate.sc | 1 + > > > > > ld/scripttempl/elfxtensa.sc | 1 + > > > > > ld/scripttempl/ft32.sc | 1 + > > > > > ld/scripttempl/iq2000.sc | 1 + > > > > > ld/scripttempl/mep.sc | 1 + > > > > > ld/scripttempl/mmo.sc | 1 + > > > > > ld/scripttempl/nds32elf.sc | 5 +++-- > > > > > ld/scripttempl/pru.sc | 1 + > > > > > ld/scripttempl/v850.sc | 1 + > > > > > ld/scripttempl/v850_rh850.sc | 1 + > > > > > ld/scripttempl/visium.sc | 1 + > > > > > ld/scripttempl/xstormy16.sc | 1 + > > > > > ld/testsuite/ld-scripts/text-order-1a.d | 2 -- > > > > > ld/testsuite/ld-scripts/text-order-1b.d | 2 -- > > > > > ld/testsuite/ld-scripts/text-order-1c.d | 2 -- > > > > > 31 files changed, 34 insertions(+), 12 deletions(-) > > > > > > > > > > diff --git a/ld/scripttempl/arclinux.sc b/ld/scripttempl/arclinux= .sc > > > > > index 36ba5a664d3..646dc08a9f8 100644 > > > > > --- a/ld/scripttempl/arclinux.sc > > > > > +++ b/ld/scripttempl/arclinux.sc > > > > > @@ -487,11 +487,12 @@ cat < > > > > .text ${RELOCATING-0} : > > > > > { > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > > > > Why after start symbols? It seems that just decreases the ability > > > > to control alignment. > > > > > > Why? > > won't it add an arbitrary amount of padding (depending on number of > > start symbols) before the actual ordering. > > Start symbols have no impact on section layout nor memory size. ah okay. > > > > > > > > > - ${RELOCATING+*(.text.unlikely .text.*_unlikely .text.unlikel= y.*)} > > > > > - ${RELOCATING+*(.text.exit .text.exit.*)} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > ${RELOCATING+*(.text.startup .text.startup.*)} > > > > > ${RELOCATING+*(.text.hot .text.hot.*)} > > > > > ${RELOCATING+*(SORT(.text.sorted.*))} > > > > > + ${RELOCATING+*(.text.unlikely .text.*_unlikely .text.unlikel= y.*)} > > > > > + ${RELOCATING+*(.text.exit .text.exit.*)} > > > > > *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > *(.gnu.warning) > > > > > diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc > > > > > index 3b18897f33c..558b4e22c75 100644 > > > > > --- a/ld/scripttempl/avr.sc > > > > > +++ b/ld/scripttempl/avr.sc > > > > > @@ -244,6 +244,7 @@ SECTIONS > > > > > KEEP (*(.init8)) > > > > > *(.init9) /* Call main(). */ > > > > > KEEP (*(.init9))} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+. =3D ALIGN(2); > > > > > *(.text.*) > > > > > diff --git a/ld/scripttempl/dlx.sc b/ld/scripttempl/dlx.sc > > > > > index 8dcbf300c56..e66c68f064d 100644 > > > > > --- a/ld/scripttempl/dlx.sc > > > > > +++ b/ld/scripttempl/dlx.sc > > > > > @@ -22,6 +22,7 @@ SECTIONS > > > > > .text : > > > > > { > > > > > ${RELOCATING+CREATE_OBJECT_SYMBOLS} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+etext =3D ${DATA_ALIGNMENT};} > > > > > } > > > > > diff --git a/ld/scripttempl/elf32cr16.sc b/ld/scripttempl/elf32cr= 16.sc > > > > > index 3e7d92a4f34..2d6cd971bc2 100644 > > > > > --- a/ld/scripttempl/elf32cr16.sc > > > > > +++ b/ld/scripttempl/elf32cr16.sc > > > > > @@ -81,6 +81,7 @@ SECTIONS > > > > > .text : > > > > > { > > > > > __TEXT_START =3D .; > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) *(.text.*) *(.gnu.linkonce.t.*) > > > > > __TEXT_END =3D .; > > > > > }${RELOCATING+ > rom} > > > > > diff --git a/ld/scripttempl/elf32crx.sc b/ld/scripttempl/elf32crx= .sc > > > > > index 1b1316676a7..1eb5e752c3a 100644 > > > > > --- a/ld/scripttempl/elf32crx.sc > > > > > +++ b/ld/scripttempl/elf32crx.sc > > > > > @@ -77,6 +77,7 @@ SECTIONS > > > > > .text : > > > > > { > > > > > __TEXT_START =3D .; > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) *(.text.*) *(.gnu.linkonce.t.*) > > > > > __TEXT_END =3D .; > > > > > } > rom > > > > > diff --git a/ld/scripttempl/elf32msp430.sc b/ld/scripttempl/elf32= msp430.sc > > > > > index bed0d673238..1fadaca2e27 100644 > > > > > --- a/ld/scripttempl/elf32msp430.sc > > > > > +++ b/ld/scripttempl/elf32msp430.sc > > > > > @@ -163,6 +163,7 @@ SECTIONS > > > > > *(.lower.text.* .lower.text) > > > > > > > > > > . =3D ALIGN(2);} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+. =3D ALIGN(2); > > > > > *(.text.*) > > > > > diff --git a/ld/scripttempl/elf64bpf.sc b/ld/scripttempl/elf64bpf= .sc > > > > > index ca62d7c88e0..93d8592a6a6 100644 > > > > > --- a/ld/scripttempl/elf64bpf.sc > > > > > +++ b/ld/scripttempl/elf64bpf.sc > > > > > @@ -508,11 +508,12 @@ cat < > > > > .text ${RELOCATING-0} : > > > > > { > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > - ${RELOCATING+*(.text.unlikely .text.*_unlikely .text.unlikel= y.*)} > > > > > - ${RELOCATING+*(.text.exit .text.exit.*)} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > ${RELOCATING+*(.text.startup .text.startup.*)} > > > > > ${RELOCATING+*(.text.hot .text.hot.*)} > > > > > ${RELOCATING+*(SORT(.text.sorted.*))} > > > > > + ${RELOCATING+*(.text.unlikely .text.*_unlikely .text.unlikel= y.*)} > > > > > + ${RELOCATING+*(.text.exit .text.exit.*)} > > > > > *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > *(.gnu.warning) > > > > > diff --git a/ld/scripttempl/elf64hppa.sc b/ld/scripttempl/elf64hp= pa.sc > > > > > index 6bde304dd27..94b458010c5 100644 > > > > > --- a/ld/scripttempl/elf64hppa.sc > > > > > +++ b/ld/scripttempl/elf64hppa.sc > > > > > @@ -412,6 +412,7 @@ cat < > > > > .text ${RELOCATING-0} : > > > > > { > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > *(.gnu.warning) > > > > > diff --git a/ld/scripttempl/elfarc.sc b/ld/scripttempl/elfarc.sc > > > > > index 1ae0248a900..ec16bf5a184 100644 > > > > > --- a/ld/scripttempl/elfarc.sc > > > > > +++ b/ld/scripttempl/elfarc.sc > > > > > @@ -288,6 +288,7 @@ cat < > > > > .text ${RELOCATING-0} : > > > > > { > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > *(.gnu.warning) > > > > > diff --git a/ld/scripttempl/elfarcv2.sc b/ld/scripttempl/elfarcv2= .sc > > > > > index 3054e4c62f3..30bcbd304ab 100644 > > > > > --- a/ld/scripttempl/elfarcv2.sc > > > > > +++ b/ld/scripttempl/elfarcv2.sc > > > > > @@ -192,6 +192,7 @@ SECTIONS > > > > > > > > > > /* Remaining code. */ > > > > > ${RELOCATING+ . =3D ALIGN(4);} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > *(.gnu.warning) > > > > > diff --git a/ld/scripttempl/elfd10v.sc b/ld/scripttempl/elfd10v.s= c > > > > > index 1ecf4a19092..e42bf3cfa70 100644 > > > > > --- a/ld/scripttempl/elfd10v.sc > > > > > +++ b/ld/scripttempl/elfd10v.sc > > > > > @@ -109,6 +109,7 @@ SECTIONS > > > > > KEEP (*(SORT_NONE(.init.*))) > > > > > KEEP (*(SORT_NONE(.fini))) > > > > > KEEP (*(SORT_NONE(.fini.*)))} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > diff --git a/ld/scripttempl/elfd30v.sc b/ld/scripttempl/elfd30v.s= c > > > > > index ed0c412edc8..2dcbb7522cc 100644 > > > > > --- a/ld/scripttempl/elfd30v.sc > > > > > +++ b/ld/scripttempl/elfd30v.sc > > > > > @@ -125,6 +125,7 @@ SECTIONS > > > > > /* Internal text space or external memory */ > > > > > .text : > > > > > { > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.gnu.linkonce.t*) > > > > > KEEP (*(SORT_NONE(.fini))) > > > > > diff --git a/ld/scripttempl/elfm68hc11.sc b/ld/scripttempl/elfm68= hc11.sc > > > > > index b122da0e32a..f4393a87b68 100644 > > > > > --- a/ld/scripttempl/elfm68hc11.sc > > > > > +++ b/ld/scripttempl/elfm68hc11.sc > > > > > @@ -318,6 +318,7 @@ SECTIONS > > > > > /* Put startup code at beginning so that _start keeps same a= ddress. */ > > > > > ${RELOCATING+${STARTUP_CODE}} > > > > > > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > diff --git a/ld/scripttempl/elfm68hc12.sc b/ld/scripttempl/elfm68= hc12.sc > > > > > index 47410a95f46..24ea7ed0302 100644 > > > > > --- a/ld/scripttempl/elfm68hc12.sc > > > > > +++ b/ld/scripttempl/elfm68hc12.sc > > > > > @@ -317,6 +317,7 @@ SECTIONS > > > > > /* Put startup code at beginning so that _start keeps same a= ddress. */ > > > > > ${RELOCATING+${STARTUP_CODE}} > > > > > > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > diff --git a/ld/scripttempl/elfm9s12z.sc b/ld/scripttempl/elfm9s1= 2z.sc > > > > > index 271d218835b..2d929e1e3fe 100644 > > > > > --- a/ld/scripttempl/elfm9s12z.sc > > > > > +++ b/ld/scripttempl/elfm9s12z.sc > > > > > @@ -303,6 +303,7 @@ SECTIONS > > > > > /* Put startup code at beginning so that _start keeps same a= ddress. */ > > > > > ${RELOCATING+${STARTUP_CODE}} > > > > > > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > diff --git a/ld/scripttempl/elfmicroblaze.sc b/ld/scripttempl/elf= microblaze.sc > > > > > index 88abe4f10ba..e386da51512 100644 > > > > > --- a/ld/scripttempl/elfmicroblaze.sc > > > > > +++ b/ld/scripttempl/elfmicroblaze.sc > > > > > @@ -79,6 +79,7 @@ SECTIONS > > > > > > > > > > ${RELOCATING+ _ftext =3D .;} > > > > > .text : { > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > ${RELOCATING+*(.gnu.linkonce.t.*)} > > > > > diff --git a/ld/scripttempl/elfxgate.sc b/ld/scripttempl/elfxgate= .sc > > > > > index 4c25bc161f2..71d4855f47e 100644 > > > > > --- a/ld/scripttempl/elfxgate.sc > > > > > +++ b/ld/scripttempl/elfxgate.sc > > > > > @@ -317,6 +317,7 @@ SECTIONS > > > > > /* Put startup code at beginning so that _start keeps same a= ddress. */ > > > > > ${RELOCATING+${STARTUP_CODE}} > > > > > > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxten= sa.sc > > > > > index 231f53b5f5b..abc1d33350e 100644 > > > > > --- a/ld/scripttempl/elfxtensa.sc > > > > > +++ b/ld/scripttempl/elfxtensa.sc > > > > > @@ -418,6 +418,7 @@ cat < > > > > ${RELOCATING+${INIT_END}} > > > > > > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.literal .text .stub${RELOCATING+ .literal.* .text.* .gnu.= linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*}) > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > *(.gnu.warning) > > > > > diff --git a/ld/scripttempl/ft32.sc b/ld/scripttempl/ft32.sc > > > > > index e52e75cd924..8c966de3bb1 100644 > > > > > --- a/ld/scripttempl/ft32.sc > > > > > +++ b/ld/scripttempl/ft32.sc > > > > > @@ -32,6 +32,7 @@ SECTIONS > > > > > { > > > > > .text : > > > > > { > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text${RELOCATING+*}) > > > > > ${RELOCATING+*(.strings) > > > > > *(._pm*) > > > > > diff --git a/ld/scripttempl/iq2000.sc b/ld/scripttempl/iq2000.sc > > > > > index e85aa2303ed..94e834aef15 100644 > > > > > --- a/ld/scripttempl/iq2000.sc > > > > > +++ b/ld/scripttempl/iq2000.sc > > > > > @@ -297,6 +297,7 @@ cat < > > > > .text ${RELOCATING-0} : > > > > > { > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > *(.stub) > > > > > diff --git a/ld/scripttempl/mep.sc b/ld/scripttempl/mep.sc > > > > > index 39e4d64857c..656b1f64386 100644 > > > > > --- a/ld/scripttempl/mep.sc > > > > > +++ b/ld/scripttempl/mep.sc > > > > > @@ -310,6 +310,7 @@ cat < > > > > .text ${RELOCATING-0} : > > > > > { > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > *(.gnu.warning) > > > > > diff --git a/ld/scripttempl/mmo.sc b/ld/scripttempl/mmo.sc > > > > > index e87a758eb90..ac6a57eee2a 100644 > > > > > --- a/ld/scripttempl/mmo.sc > > > > > +++ b/ld/scripttempl/mmo.sc > > > > > @@ -30,6 +30,7 @@ SECTIONS > > > > > ${RELOCATING+ KEEP (*(SORT_NONE(.init)))} > > > > > ${RELOCATING+ PROVIDE (_init_end =3D .);} > > > > > > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > ${RELOCATING+*(.gnu.linkonce.t*)} > > > > > diff --git a/ld/scripttempl/nds32elf.sc b/ld/scripttempl/nds32elf= .sc > > > > > index 0f8366d91ac..2626e773a4e 100644 > > > > > --- a/ld/scripttempl/nds32elf.sc > > > > > +++ b/ld/scripttempl/nds32elf.sc > > > > > @@ -434,11 +434,12 @@ cat < > > > > .text ${RELOCATING-0} : > > > > > { > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > - ${RELOCATING+*(.text.unlikely .text.*_unlikely .text.unlikel= y.*)} > > > > > - ${RELOCATING+*(.text.exit .text.exit.*)} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > ${RELOCATING+*(.text.startup .text.startup.*)} > > > > > ${RELOCATING+*(.text.hot .text.hot.*)} > > > > > ${RELOCATING+*(SORT(.text.sorted.*))} > > > > > + ${RELOCATING+*(.text.unlikely .text.*_unlikely .text.unlikel= y.*)} > > > > > + ${RELOCATING+*(.text.exit .text.exit.*)} > > > > > *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) > > > > > /* .gnu.warning sections are handled specially by elf.em. *= / > > > > > *(.gnu.warning) > > > > > diff --git a/ld/scripttempl/pru.sc b/ld/scripttempl/pru.sc > > > > > index 3ff86bc61c7..d4d79cbcf82 100644 > > > > > --- a/ld/scripttempl/pru.sc > > > > > +++ b/ld/scripttempl/pru.sc > > > > > @@ -110,6 +110,7 @@ SECTIONS > > > > > ${RELOCATING+KEEP (*(.init0))} > > > > > > > > > > ${RELOCATING+. =3D ALIGN(4);} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+. =3D ALIGN(4);} > > > > > ${RELOCATING+*(.text.*)} > > > > > diff --git a/ld/scripttempl/v850.sc b/ld/scripttempl/v850.sc > > > > > index 10d1da8b5bb..530b4ee72ca 100644 > > > > > --- a/ld/scripttempl/v850.sc > > > > > +++ b/ld/scripttempl/v850.sc > > > > > @@ -76,6 +76,7 @@ SECTIONS > > > > > > > > > > .text : > > > > > { > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > > > > > > diff --git a/ld/scripttempl/v850_rh850.sc b/ld/scripttempl/v850_r= h850.sc > > > > > index e63e7db8884..3d2874267a9 100644 > > > > > --- a/ld/scripttempl/v850_rh850.sc > > > > > +++ b/ld/scripttempl/v850_rh850.sc > > > > > @@ -80,6 +80,7 @@ SECTIONS > > > > > > > > > > .text : > > > > > { > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > > > > > > diff --git a/ld/scripttempl/visium.sc b/ld/scripttempl/visium.sc > > > > > index 0b90b888136..8d97bbf4a68 100644 > > > > > --- a/ld/scripttempl/visium.sc > > > > > +++ b/ld/scripttempl/visium.sc > > > > > @@ -67,6 +67,7 @@ SECTIONS > > > > > > > > > > .text ${RELOCATING-0} : { > > > > > ${RELOCATING+ _ftext =3D .;} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > ${RELOCATING+*(.gnu.linkonce.t.*)} > > > > > diff --git a/ld/scripttempl/xstormy16.sc b/ld/scripttempl/xstormy= 16.sc > > > > > index c4117fcde3e..3de1bfa0d18 100644 > > > > > --- a/ld/scripttempl/xstormy16.sc > > > > > +++ b/ld/scripttempl/xstormy16.sc > > > > > @@ -179,6 +179,7 @@ SECTIONS > > > > > .text ${RELOCATING-0} : > > > > > { > > > > > ${RELOCATING+${TEXT_START_SYMBOLS}} > > > > > + ${RELOCATING+INCLUDE config.text_section_ordering_file} > > > > > *(.text) > > > > > ${RELOCATING+*(.text.*)} > > > > > *(.stub) > > > > > diff --git a/ld/testsuite/ld-scripts/text-order-1a.d b/ld/testsui= te/ld-scripts/text-order-1a.d > > > > > index 87cee75055f..d6f976f42ad 100644 > > > > > --- a/ld/testsuite/ld-scripts/text-order-1a.d > > > > > +++ b/ld/testsuite/ld-scripts/text-order-1a.d > > > > > @@ -4,8 +4,6 @@ > > > > > #ld: --text-section-ordering-file text-order-1a.t > > > > > #nm: -n > > > > > #target: [is_elf_format] > > > > > -#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* > > > > > -# generic linker targets don't support --text-section-ordering-f= ile > > > > > > > > > > #... > > > > > [0-9a-f]+ T yyy > > > > > diff --git a/ld/testsuite/ld-scripts/text-order-1b.d b/ld/testsui= te/ld-scripts/text-order-1b.d > > > > > index 3f83813da2b..3d6f4fd8d66 100644 > > > > > --- a/ld/testsuite/ld-scripts/text-order-1b.d > > > > > +++ b/ld/testsuite/ld-scripts/text-order-1b.d > > > > > @@ -4,8 +4,6 @@ > > > > > #ld: --text-section-ordering-file text-order-1b.t > > > > > #nm: -n > > > > > #target: [is_elf_format] > > > > > -#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* > > > > > -# generic linker targets don't support --text-section-ordering-f= ile > > > > > > > > > > #... > > > > > [0-9a-f]+ T yyy > > > > > diff --git a/ld/testsuite/ld-scripts/text-order-1c.d b/ld/testsui= te/ld-scripts/text-order-1c.d > > > > > index 0c484637784..4166d634606 100644 > > > > > --- a/ld/testsuite/ld-scripts/text-order-1c.d > > > > > +++ b/ld/testsuite/ld-scripts/text-order-1c.d > > > > > @@ -4,6 +4,4 @@ > > > > > #ld: --text-section-ordering-file text-order-1c.t > > > > > #nm: -n > > > > > #target: [is_elf_format] > > > > > -#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* > > > > > -# generic linker targets don't support --text-section-ordering-f= ile > > > > > #error: .*: nested include 'text-order-1b.t' in the text section= ordering file: 'text-order-1c.t' > > > > > -- > > > > > 2.43.0 > > > > > > > > > > > > > > > > > -- > > > H.J. > > > > -- > H.J.