public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Add support for aarch64-nto-qnx
@ 2023-03-16 10:17 Clément Chigot
  2023-03-16 10:17 ` [PATCH 1/5] configure: add new target aarch64-*-nto* Clément Chigot
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Clément Chigot @ 2023-03-16 10:17 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

This serie adds support for the QNX Neutrino operating system over
aarch64 architecture.
It creates a new aarch64-nto linker emulation applying nto.em
over aarch64elf.em. For now, this nto.em has not be included
for other nto targets (sh-nto, arm-nto, etc).

Clément Chigot (5):
  configure: add new target aarch64-*-nto*
  readelf: add support for QNT_STACK note subsections
  ld: add support of QNX stack arguments for aarch64nto
  ld/testsuite: add aarch64nto to ld-aarch64
  ld/testsuite: disable ilp32 tests for aarch64-qnx

 bfd/config.bfd                                |   2 +-
 bfd/elf.c                                     |  13 +-
 binutils/readelf.c                            |  67 +++++++
 gas/configure.tgt                             |   1 +
 include/elf/common.h                          |  13 ++
 ld/Makefile.am                                |   2 +
 ld/Makefile.in                                |   3 +
 ld/configure.tgt                              |   3 +
 ld/emulparams/aarch64nto.sh                   |  41 +++++
 ld/emultempl/nto.em                           | 163 ++++++++++++++++++
 ld/testsuite/ld-aarch64/aarch64-elf.exp       |   3 +
 ld/testsuite/ld-aarch64/aarch64-nto.exp       |  28 +++
 .../ld-aarch64/emit-relocs-112-overflow.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-112.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-113.d     |   1 +
 .../ld-aarch64/emit-relocs-114-overflow.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-114.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-115.d     |   1 +
 .../ld-aarch64/emit-relocs-116-overflow.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-116.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-117.d     |   1 +
 .../ld-aarch64/emit-relocs-118-overflow.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-118.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-119.d     |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-22.d      |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-23.d      |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-28.d      |   1 +
 .../ld-aarch64/emit-relocs-86-overflow.d      |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-86.d      |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-87.d      |   1 +
 .../ld-aarch64/emit-relocs-88-overflow.d      |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-88.d      |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-89.d      |   1 +
 .../ld-aarch64/emit-relocs-90-overflow.d      |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-90.d      |   1 +
 ld/testsuite/ld-aarch64/emit-relocs-92.d      |   1 +
 ld/testsuite/ld-aarch64/nto-stack-note-1.d    |  12 ++
 ld/testsuite/ld-aarch64/nto-stack-note-2.d    |  12 ++
 ld/testsuite/ld-aarch64/start.s               |   4 +
 ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d   |   1 +
 ld/testsuite/ld-aarch64/tls-relax-all-ilp32.d |   1 +
 .../ld-aarch64/tls-relax-gd-ie-ilp32.d        |   1 +
 .../ld-aarch64/tls-relax-gd-le-ilp32.d        |   1 +
 .../ld-aarch64/tls-relax-gdesc-le-2-ilp32.d   |   1 +
 .../ld-aarch64/tls-relax-gdesc-le-ilp32.d     |   1 +
 .../ld-aarch64/tls-relax-ie-le-2-ilp32.d      |   1 +
 .../ld-aarch64/tls-relax-ie-le-3-ilp32.d      |   1 +
 .../ld-aarch64/tls-relax-ie-le-ilp32.d        |   1 +
 .../ld-aarch64/tls-relax-ld-le-small-ilp32.d  |   1 +
 .../ld-aarch64/tls-relax-ld-le-tiny-ilp32.d   |   1 +
 .../ld-aarch64/tls-tiny-desc-ie-ilp32.d       |   1 +
 .../ld-aarch64/tls-tiny-desc-le-ilp32.d       |   1 +
 .../ld-aarch64/tls-tiny-gd-ie-ilp32.d         |   1 +
 .../ld-aarch64/tls-tiny-gd-le-ilp32.d         |   1 +
 54 files changed, 396 insertions(+), 10 deletions(-)
 create mode 100644 ld/emulparams/aarch64nto.sh
 create mode 100644 ld/emultempl/nto.em
 create mode 100644 ld/testsuite/ld-aarch64/aarch64-nto.exp
 create mode 100644 ld/testsuite/ld-aarch64/nto-stack-note-1.d
 create mode 100644 ld/testsuite/ld-aarch64/nto-stack-note-2.d
 create mode 100644 ld/testsuite/ld-aarch64/start.s

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] configure: add new target aarch64-*-nto*
  2023-03-16 10:17 [PATCH 0/5] Add support for aarch64-nto-qnx Clément Chigot
@ 2023-03-16 10:17 ` Clément Chigot
  2023-03-16 10:17 ` [PATCH 2/5] readelf: add support for QNT_STACK note subsections Clément Chigot
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Clément Chigot @ 2023-03-16 10:17 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

This target has its own ld emulation based on aarch64elf.em.
---
 bfd/config.bfd              |  2 +-
 gas/configure.tgt           |  1 +
 ld/Makefile.am              |  2 ++
 ld/Makefile.in              |  3 +++
 ld/configure.tgt            |  3 +++
 ld/emulparams/aarch64nto.sh | 41 +++++++++++++++++++++++++++++++++++++
 6 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 ld/emulparams/aarch64nto.sh

diff --git a/bfd/config.bfd b/bfd/config.bfd
index 0b0f7d50602..7af481048db 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -283,7 +283,7 @@ case "${targ}" in
     targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
     want64=true
     ;;
-  aarch64-*-linux* | aarch64-*-netbsd*)
+  aarch64-*-linux* | aarch64-*-netbsd* | aarch64-*-nto*)
     targ_defvec=aarch64_elf64_le_vec
     targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec aarch64_pei_le_vec aarch64_pe_le_vec"
     want64=true
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 5fb7d880122..3429f850d05 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -134,6 +134,7 @@ case ${generic_target} in
       aarch64*-linux-gnu_ilp32)		arch=aarch64:32 ;;
     esac ;;
   aarch64*-*-netbsd*)			fmt=elf em=nbsd;;
+  aarch64*-*-nto*)			fmt=elf;;
   aarch64*-*-openbsd*)			fmt=elf;;
   aarch64*-*-pe* | aarch64*-*-mingw*)	fmt=coff em=pepaarch64 ;;
   alpha-*-*vms*)			fmt=evax ;;
diff --git a/ld/Makefile.am b/ld/Makefile.am
index d9449a66066..0e9bed88f65 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -388,6 +388,7 @@ ALL_64_EMULATION_SOURCES = \
 	eaarch64linux32.c \
 	eaarch64linux32b.c \
 	eaarch64linuxb.c \
+	eaarch64nto.c \
 	eaarch64pe.c \
 	earm64pe.c \
 	eelf32_x86_64.c \
@@ -881,6 +882,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nto.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64pe.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earm64pe.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_x86_64.Pc@am__quote@
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 0a2981616f0..15f88bf606d 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -888,6 +888,7 @@ ALL_64_EMULATION_SOURCES = \
 	eaarch64linux32.c \
 	eaarch64linux32b.c \
 	eaarch64linuxb.c \
+	eaarch64nto.c \
 	eaarch64pe.c \
 	earm64pe.c \
 	eelf32_x86_64.c \
@@ -1266,6 +1267,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nto.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64pe.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5ppc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5rs6.Po@am__quote@
@@ -2597,6 +2599,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nto.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64pe.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earm64pe.Pc@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_x86_64.Pc@am__quote@
diff --git a/ld/configure.tgt b/ld/configure.tgt
index efd43095844..34c9d67c365 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -118,6 +118,9 @@ aarch64-*-linux*)	targ_emul=aarch64linux
 aarch64-*-haiku*)	targ_emul=aarch64haiku
 			targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath"
 			;;
+aarch64-*-nto*)		targ_emul=aarch64nto
+			targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb"
+			;;
 aarch64-*-pe* | aarch64-*-mingw*)
 			targ_emul=aarch64pe
 			targ_extra_emuls="arm64pe"
diff --git a/ld/emulparams/aarch64nto.sh b/ld/emulparams/aarch64nto.sh
new file mode 100644
index 00000000000..4f0657def55
--- /dev/null
+++ b/ld/emulparams/aarch64nto.sh
@@ -0,0 +1,41 @@
+ARCH=aarch64
+MACHINE=
+NOP=0x1f2003d5
+
+SCRIPT_NAME=elf
+ELFSIZE=64
+OUTPUT_FORMAT="elf64-littleaarch64"
+BIG_OUTPUT_FORMAT="elf64-bigaarch64"
+LITTLE_OUTPUT_FORMAT="elf64-littleaarch64"
+NO_REL_RELOCS=yes
+
+TEMPLATE_NAME=elf
+EXTRA_EM_FILE=aarch64elf
+
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 24 ? 24 : 0"
+IREL_IN_PLT=
+
+TEXT_START_ADDR=0x400000
+
+TEXT_START_SYMBOLS='PROVIDE (_btext = .);'
+DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
+
+# AArch64 does not support .s* sections.
+NO_SMALL_DATA=yes
+
+OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
+OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
+OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
+
+OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
+ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
+# Ensure each PLT entry is aligned to a cache line.
+PLT=".plt          ${RELOCATING-0} : ALIGN(16) { *(.plt)${RELOCATING+${IREL_IN_PLT+ *(.iplt)}} }"
+
+
+ELF_INTERPRETER_NAME=\"/usr/lib/ldqnx-64.so.2\"
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/5] readelf: add support for QNT_STACK note subsections
  2023-03-16 10:17 [PATCH 0/5] Add support for aarch64-nto-qnx Clément Chigot
  2023-03-16 10:17 ` [PATCH 1/5] configure: add new target aarch64-*-nto* Clément Chigot
@ 2023-03-16 10:17 ` Clément Chigot
  2023-03-16 10:17 ` [PATCH 3/5] ld: add support of QNX stack arguments for aarch64nto Clément Chigot
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Clément Chigot @ 2023-03-16 10:17 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

QNX provides some .note subsections. QNT_STACK is the one controling
the stack allocation.

bfd/ChangeLog:

	* elf.c (BFD_QNT_CORE_INFO): Delete.
	(BFD_QNT_CORE_STATUS): Likewise.
	(BFD_QNT_CORE_GREG): Likewise.
	(BFD_QNT_CORE_FPREG): Likewise.
	(elfcore_grok_nto_note): Replace BFD_QNT_* by QNT_*.

binutils/ChangeLog:

	* readelf.c (get_qnx_elfcore_note_type): New function.
	(print_qnx_note): New function.
	(process_note): Add support for QNX support.

include/ChangeLog:

	* elf/common.h (QNT_DEBUG_FULLPATH): New define.
	(QNT_DEBUG_RELOC): New define.
	(QNT_STACK): New define.
	(QNT_GENERATOR): New define.
	(QNT_DEFAULT_LIB): New define.
	(QNT_CORE_SYSINFO): New define.
	(QNT_CORE_INFO): New define.
	(QNT_CORE_STATUS): New define.
	(QNT_CORE_GREG): New define.
	(QNT_CORE_FPREG): New define.
	(QNT_LINK_MAP): New define.
---
 bfd/elf.c            | 13 +++------
 binutils/readelf.c   | 67 ++++++++++++++++++++++++++++++++++++++++++++
 include/elf/common.h | 13 +++++++++
 3 files changed, 84 insertions(+), 9 deletions(-)

diff --git a/bfd/elf.c b/bfd/elf.c
index 409be7068ec..5c3b3c0eff4 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -11543,11 +11543,6 @@ elfcore_grok_nto_regs (bfd *abfd,
   return true;
 }
 
-#define BFD_QNT_CORE_INFO	7
-#define BFD_QNT_CORE_STATUS	8
-#define BFD_QNT_CORE_GREG	9
-#define BFD_QNT_CORE_FPREG	10
-
 static bool
 elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note)
 {
@@ -11558,13 +11553,13 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note)
 
   switch (note->type)
     {
-    case BFD_QNT_CORE_INFO:
+    case QNT_CORE_INFO:
       return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note);
-    case BFD_QNT_CORE_STATUS:
+    case QNT_CORE_STATUS:
       return elfcore_grok_nto_status (abfd, note, &tid);
-    case BFD_QNT_CORE_GREG:
+    case QNT_CORE_GREG:
       return elfcore_grok_nto_regs (abfd, note, tid, ".reg");
-    case BFD_QNT_CORE_FPREG:
+    case QNT_CORE_FPREG:
       return elfcore_grok_nto_regs (abfd, note, tid, ".reg2");
     default:
       return true;
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 0d9d2017901..4c540302e22 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -20722,6 +20722,38 @@ get_openbsd_elfcore_note_type (Filedata * filedata, unsigned e_type)
   return get_note_type (filedata, e_type);
 }
 
+static const char *
+get_qnx_elfcore_note_type (Filedata * filedata, unsigned e_type)
+{
+  switch (e_type)
+    {
+    case QNT_DEBUG_FULLPATH:
+      return _("QNX debug fullpath");
+    case QNT_DEBUG_RELOC:
+      return _("QNX debug relocation");
+    case QNT_STACK:
+      return _("QNX stack");
+    case QNT_GENERATOR:
+      return _("QNX generator");
+    case QNT_DEFAULT_LIB:
+      return _("QNX default library");
+    case QNT_CORE_SYSINFO:
+      return _("QNX core sysinfo");
+    case QNT_CORE_INFO:
+      return _("QNX core info");
+    case QNT_CORE_STATUS:
+      return _("QNX core status");
+    case QNT_CORE_GREG:
+      return _("QNX general registers");
+    case QNT_CORE_FPREG:
+      return _("QNX floating point registers");
+    case QNT_LINK_MAP:
+      return _("QNX link map");
+    }
+
+  return get_note_type (filedata, e_type);
+}
+
 static const char *
 get_stapsdt_note_type (unsigned e_type)
 {
@@ -21646,6 +21678,35 @@ print_amdgpu_note (Elf_Internal_Note *pnote)
 #endif
 }
 
+static bool
+print_qnx_note (Elf_Internal_Note *pnote)
+{
+  switch (pnote->type)
+    {
+    case QNT_STACK:
+      if (pnote->descsz != 12)
+	goto desc_size_fail;
+
+      printf (_("   Stack Size: 0x%" PRIx32 "\n"),
+	      (unsigned) byte_get ((unsigned char *) pnote->descdata, 4));
+      printf (_("   Stack allocated: %" PRIx32 "\n"),
+	      (unsigned) byte_get ((unsigned char *) pnote->descdata + 4, 4));
+      printf (_("   Executable: %s\n"),
+	      ((unsigned) byte_get ((unsigned char *) pnote->descdata + 8, 1)) ? "no": "yes");
+      break;
+
+    default:
+      print_note_contents_hex(pnote);
+    }
+  return true;
+
+desc_size_fail:
+  printf (_("  <corrupt - data size is too small>\n"));
+  error (_("corrupt QNX note: data size is too small\n"));
+  return false;
+}
+
+
 /* Note that by the ELF standard, the name field is already null byte
    terminated, and namesz includes the terminating null byte.
    I.E. the value of namesz for the name "FSF" is 4.
@@ -21692,6 +21753,10 @@ process_note (Elf_Internal_Note *  pnote,
     /* OpenBSD-specific core file notes.  */
     nt = get_openbsd_elfcore_note_type (filedata, pnote->type);
 
+  else if (startswith (pnote->namedata, "QNX"))
+    /* QNX-specific core file notes.  */
+    nt = get_qnx_elfcore_note_type (filedata, pnote->type);
+
   else if (startswith (pnote->namedata, "SPU/"))
     {
       /* SPU-specific core file notes.  */
@@ -21746,6 +21811,8 @@ process_note (Elf_Internal_Note *  pnote,
   else if (startswith (pnote->namedata, "AMDGPU")
 	   && pnote->type == NT_AMDGPU_METADATA)
     return print_amdgpu_note (pnote);
+  else if (startswith (pnote->namedata, "QNX"))
+    return print_qnx_note (pnote);
 
   print_note_contents_hex (pnote);
   return true;
diff --git a/include/elf/common.h b/include/elf/common.h
index d19d6f9927d..630d212bbb2 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -768,6 +768,19 @@
 #define NT_OPENBSD_XFPREGS	22
 #define NT_OPENBSD_WCOOKIE	23
 
+/* Note segments for core files on QNX systems.  Note name
+   must start with "QNX".  */
+#define QNT_DEBUG_FULLPATH 1
+#define QNT_DEBUG_RELOC    2
+#define QNT_STACK          3
+#define QNT_GENERATOR      4
+#define QNT_DEFAULT_LIB    5
+#define QNT_CORE_SYSINFO   6
+#define QNT_CORE_INFO      7
+#define QNT_CORE_STATUS    8
+#define QNT_CORE_GREG      9
+#define QNT_CORE_FPREG     10
+#define QNT_LINK_MAP       11
 
 /* Note segments for core files on Solaris systems.  Note name
    must start with "CORE".  */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/5] ld: add support of QNX stack arguments for aarch64nto
  2023-03-16 10:17 [PATCH 0/5] Add support for aarch64-nto-qnx Clément Chigot
  2023-03-16 10:17 ` [PATCH 1/5] configure: add new target aarch64-*-nto* Clément Chigot
  2023-03-16 10:17 ` [PATCH 2/5] readelf: add support for QNT_STACK note subsections Clément Chigot
@ 2023-03-16 10:17 ` Clément Chigot
  2023-03-16 10:17 ` [PATCH 4/5] ld/testsuite: add aarch64nto to ld-aarch64 Clément Chigot
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Clément Chigot @ 2023-03-16 10:17 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

QNX is handling the stack argument using a .note section. Generate it
according to ELF argument -zexecstack, -zstack-size and a new NTO
argument --lazy-stack. Another NTO argument --stack mimicking
-zstack-size is added in order to ensure compatibility with previously
made NTO linkers.
This requires a new emultempl nto.em which is applied above the default
${ARCH}elf.em.

ld/ChangeLog:

	* emulparams/aarch64nto.sh: Move to nto.em.
	* emultempl/nto.em: New file.
	* testsuite/ld-aarch64/aarch64-nto.exp: New test.
	* testsuite/ld-aarch64/nto-stack-note-1.d: New test.
	* testsuite/ld-aarch64/nto-stack-note-2.d: New test.
	* testsuite/ld-aarch64/start.s: New test.
---
 ld/emulparams/aarch64nto.sh                |   2 +-
 ld/emultempl/nto.em                        | 163 +++++++++++++++++++++
 ld/testsuite/ld-aarch64/aarch64-nto.exp    |  28 ++++
 ld/testsuite/ld-aarch64/nto-stack-note-1.d |  12 ++
 ld/testsuite/ld-aarch64/nto-stack-note-2.d |  12 ++
 ld/testsuite/ld-aarch64/start.s            |   4 +
 6 files changed, 220 insertions(+), 1 deletion(-)
 create mode 100644 ld/emultempl/nto.em
 create mode 100644 ld/testsuite/ld-aarch64/aarch64-nto.exp
 create mode 100644 ld/testsuite/ld-aarch64/nto-stack-note-1.d
 create mode 100644 ld/testsuite/ld-aarch64/nto-stack-note-2.d
 create mode 100644 ld/testsuite/ld-aarch64/start.s

diff --git a/ld/emulparams/aarch64nto.sh b/ld/emulparams/aarch64nto.sh
index 4f0657def55..5138e335ccc 100644
--- a/ld/emulparams/aarch64nto.sh
+++ b/ld/emulparams/aarch64nto.sh
@@ -10,7 +10,7 @@ LITTLE_OUTPUT_FORMAT="elf64-littleaarch64"
 NO_REL_RELOCS=yes
 
 TEMPLATE_NAME=elf
-EXTRA_EM_FILE=aarch64elf
+EXTRA_EM_FILE=nto
 
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
diff --git a/ld/emultempl/nto.em b/ld/emultempl/nto.em
new file mode 100644
index 00000000000..b38fddd251c
--- /dev/null
+++ b/ld/emultempl/nto.em
@@ -0,0 +1,163 @@
+# This shell script emits a C file. -*- C -*-
+#   Copyright 2023 Free Software Foundation, Inc.
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from elf.em, and defines extra Neutrino
+# specific routines.
+
+# NTO templates aims to refine the default ${ARCH}elf.em template.
+. "${srcdir}/emultempl/${ARCH}elf.em"
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+#include "elf/internal.h"
+#include "elf/common.h"
+#include "elf-bfd.h"
+#include "../bfd/libbfd.h"
+
+bool nto_lazy_stack = false;
+struct nto_stack_note
+{
+  unsigned char stacksize[4];
+  unsigned char stackalloc[4];
+  unsigned char execstack[4];
+};
+
+/* Generate the QNT_STACK .note section.  */
+static void
+nto_add_note_section (void) {
+  asection *note_sec;
+  flagword flags;
+  Elf_External_Note *e_note;
+  bfd_size_type size, h_size;
+  struct nto_stack_note *n_note;
+
+  /* Don't create a note if the stack size isn't provided.  */
+  if (link_info.stacksize <= 0)
+    return;
+
+  /* As ${ARCH}elf.em is imported and ${ARCH}_elf_create_output_section_statements
+     is called before this function, stub_file should already be defined.  */
+  if (!stub_file)
+    {
+      einfo (_("%F%P: cannot create .note section in stub BFD.\n"));
+      return;
+    }
+
+  if (nto_lazy_stack && !link_info.stacksize)
+    {
+      einfo (_("%F%P: error: --lazy-stack must follow -zstack-size=<size>\n"));
+      return;
+    }
+
+  flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
+	   | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+  note_sec = bfd_make_section_anyway_with_flags (stub_file->the_bfd, ".note", flags);
+  if (! note_sec)
+    {
+      einfo (_("%F%P: failed to create .note section\n"));
+      return;
+    }
+
+  size = offsetof (Elf_External_Note, name[sizeof "QNX"]);
+  size = (size + 3) & -(bfd_size_type) 4;
+  h_size = size;
+  size += sizeof (struct nto_stack_note);
+  note_sec->size = size;
+
+  elf_section_type (note_sec) = SHT_NOTE;
+  note_sec->contents = xmalloc (note_sec->size);
+  e_note = (Elf_External_Note *) note_sec->contents;
+  bfd_h_put_32 (stub_file->the_bfd, sizeof "QNX", &e_note->namesz);
+  bfd_h_put_32 (stub_file->the_bfd, sizeof (struct nto_stack_note), &e_note->descsz);
+  bfd_h_put_32 (stub_file->the_bfd, QNT_STACK, &e_note->type);
+  memcpy (e_note->name, "QNX", sizeof "QNX");
+
+
+  /* Generate .note content.*/
+  n_note = (struct nto_stack_note *) (note_sec->contents + h_size);
+  bfd_h_put_32 (stub_file->the_bfd, link_info.stacksize, &n_note->stacksize);
+
+  if (nto_lazy_stack)
+    bfd_h_put_32 (stub_file->the_bfd, 4096, &n_note->stackalloc);
+  else
+    bfd_h_put_32 (stub_file->the_bfd, link_info.stacksize, &n_note->stackalloc);
+
+  if (link_info.execstack != link_info.noexecstack && link_info.execstack)
+    bfd_h_put_32 (stub_file->the_bfd, 0, &n_note->execstack);
+  else
+    bfd_h_put_32 (stub_file->the_bfd, 1, &n_note->execstack);
+
+}
+
+static void
+nto_create_output_section_statements (void)
+{
+  ${ARCH}_elf_create_output_section_statements ();
+  nto_add_note_section();
+}
+
+EOF
+
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+
+PARSE_AND_LIST_PROLOGUE=${PARSE_AND_LIST_PROLOGUE}'
+enum nto_options
+{
+  OPTION_STACK = 500,
+  OPTION_LAZY_STACK,
+};
+'
+
+PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
+  { "stack", required_argument, NULL, OPTION_STACK },
+  { "lazy-stack", no_argument, NULL, OPTION_LAZY_STACK },
+'
+
+PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
+  fprintf (file, _("\
+  --stack <size>              Set size of the initial stack\n\
+  --lazy-stack		      Set lazy allocation of stack\n\
+"));
+'
+
+PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
+    case OPTION_STACK:
+      {
+        char *end;
+        link_info.stacksize = strtoul (optarg, &end, 0);
+        if (*end || link_info.stacksize < 0)
+          einfo (_("%F%P: invalid stack size `%s'\''\n"), optarg + 11);
+        if (!link_info.stacksize)
+          /* Use -1 for explicit no-stack, because zero means
+             'default'.   */
+          link_info.stacksize = -1;
+        break;
+      }
+    case OPTION_LAZY_STACK:
+      nto_lazy_stack = true;
+      break;
+'
+
+# Put these extra Neutrino routines in ld_${EMULATION_NAME}_emulation
+#
+
+LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=nto_create_output_section_statements
diff --git a/ld/testsuite/ld-aarch64/aarch64-nto.exp b/ld/testsuite/ld-aarch64/aarch64-nto.exp
new file mode 100644
index 00000000000..4fd6245e9a2
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/aarch64-nto.exp
@@ -0,0 +1,28 @@
+
+# Expect script for various AARCH64 NTO tests.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+#
+# This file is part of the GNU Binutils.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+# Exclude non-aarch64-NTO targets.
+if { ![istarget "aarch64*-*-nto*"] } {
+    return
+}
+
+run_dump_test "nto-stack-note-1"
+run_dump_test "nto-stack-note-2"
diff --git a/ld/testsuite/ld-aarch64/nto-stack-note-1.d b/ld/testsuite/ld-aarch64/nto-stack-note-1.d
new file mode 100644
index 00000000000..d85dbcadb6b
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/nto-stack-note-1.d
@@ -0,0 +1,12 @@
+#name: nto-stack-note-1
+#source: start.s
+#as:
+#ld: -z stack-size=0x10000
+#readelf: -n
+
+Displaying notes found in: .note
+[ 	]+Owner[ 	]+Data size[ 	]+Description
+  QNX                  0x0000000c	QNX stack
+   Stack Size: 0x10000
+   Stack allocated: 10000
+   Executable: no
diff --git a/ld/testsuite/ld-aarch64/nto-stack-note-2.d b/ld/testsuite/ld-aarch64/nto-stack-note-2.d
new file mode 100644
index 00000000000..9e446ccea5c
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/nto-stack-note-2.d
@@ -0,0 +1,12 @@
+#name: nto-stack-note-2
+#source: start.s
+#as:
+#ld: -z stack-size=0x10000 --lazy-stack -z execstack
+#readelf: -n
+
+Displaying notes found in: .note
+[ 	]+Owner[ 	]+Data size[ 	]+Description
+  QNX                  0x0000000c	QNX stack
+   Stack Size: 0x10000
+   Stack allocated: 1000
+   Executable: yes
diff --git a/ld/testsuite/ld-aarch64/start.s b/ld/testsuite/ld-aarch64/start.s
new file mode 100644
index 00000000000..58d42a60324
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/start.s
@@ -0,0 +1,4 @@
+        .global _start
+        .text
+_start:
+        nop
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/5] ld/testsuite: add aarch64nto to ld-aarch64
  2023-03-16 10:17 [PATCH 0/5] Add support for aarch64-nto-qnx Clément Chigot
                   ` (2 preceding siblings ...)
  2023-03-16 10:17 ` [PATCH 3/5] ld: add support of QNX stack arguments for aarch64nto Clément Chigot
@ 2023-03-16 10:17 ` Clément Chigot
  2023-03-16 10:17 ` [PATCH 5/5] ld/testsuite: disable ilp32 tests for aarch64-qnx Clément Chigot
  2023-03-16 13:02 ` [PATCH 0/5] Add support for aarch64-nto-qnx Nick Clifton
  5 siblings, 0 replies; 7+ messages in thread
From: Clément Chigot @ 2023-03-16 10:17 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

ld/ChangeLog:

        * testsuite/ld-aarch64/aarch64-elf.exp: Add support for
        aarch64nto.
---
 ld/testsuite/ld-aarch64/aarch64-elf.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index a6c2862a159..48c8c12ef8f 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -66,6 +66,9 @@ proc aarch64_choose_lp64_emul {} {
 	}
 	return "aarch64linux"
     }
+    if [istarget *nto*] then {
+	return "aarch64nto"
+    }
     if [istarget aarch64_be-*] {
         return "aarch64elfb"
     }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 5/5] ld/testsuite: disable ilp32 tests for aarch64-qnx
  2023-03-16 10:17 [PATCH 0/5] Add support for aarch64-nto-qnx Clément Chigot
                   ` (3 preceding siblings ...)
  2023-03-16 10:17 ` [PATCH 4/5] ld/testsuite: add aarch64nto to ld-aarch64 Clément Chigot
@ 2023-03-16 10:17 ` Clément Chigot
  2023-03-16 13:02 ` [PATCH 0/5] Add support for aarch64-nto-qnx Nick Clifton
  5 siblings, 0 replies; 7+ messages in thread
From: Clément Chigot @ 2023-03-16 10:17 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

aarch64nto32 emulation isn't supported. The tests will then fall back
on aarch64elf32. It does work but some extra warnings are being
generated because the "-z relro" being added aarch64nto but ignored by
aarch64elf32 emulation.
Skip the tests to avoid any problems.

ld/ChangeLog:

        * testsuite/ld-aarch64/emit-relocs-112-overflow.d: Skip for
        aarch64nto.
        * testsuite/ld-aarch64/emit-relocs-112.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-113.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-114-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-114.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-115.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-116-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-116.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-117.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-118-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-118.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-119.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-22.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-23.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-28.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-86-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-86.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-87.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-88-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-88.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-89.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-90-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-90.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-92.d: Likewise.
        * testsuite/ld-aarch64/tls-desc-ie-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-all-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d: Likewise.
---
 ld/testsuite/ld-aarch64/emit-relocs-112-overflow.d    | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-112.d             | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-113.d             | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-114-overflow.d    | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-114.d             | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-115.d             | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-116-overflow.d    | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-116.d             | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-117.d             | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-118-overflow.d    | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-118.d             | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-119.d             | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-22.d              | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-23.d              | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-28.d              | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d     | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-86.d              | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-87.d              | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-88-overflow.d     | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-88.d              | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-89.d              | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-90-overflow.d     | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-90.d              | 1 +
 ld/testsuite/ld-aarch64/emit-relocs-92.d              | 1 +
 ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d           | 1 +
 ld/testsuite/ld-aarch64/tls-relax-all-ilp32.d         | 1 +
 ld/testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d       | 1 +
 ld/testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d       | 1 +
 ld/testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d  | 1 +
 ld/testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d    | 1 +
 ld/testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d     | 1 +
 ld/testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d     | 1 +
 ld/testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d       | 1 +
 ld/testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d | 1 +
 ld/testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d  | 1 +
 ld/testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d      | 1 +
 ld/testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d      | 1 +
 ld/testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d        | 1 +
 ld/testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d        | 1 +
 39 files changed, 39 insertions(+)

diff --git a/ld/testsuite/ld-aarch64/emit-relocs-112-overflow.d b/ld/testsuite/ld-aarch64/emit-relocs-112-overflow.d
index b66812b740e..4fbe787cb0f 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-112-overflow.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-112-overflow.d
@@ -1,5 +1,6 @@
 #source: emit-relocs-552-overflow.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #error: .*\(.text\+0x\d+\): relocation truncated to fit: R_AARCH64_P32_TLSLE_LDST8_TPREL_LO12 against symbol `v2' .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-112.d b/ld/testsuite/ld-aarch64/emit-relocs-112.d
index 8379cf211fe..ce6be9969c4 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-112.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-112.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-552.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 00010000 <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-113.d b/ld/testsuite/ld-aarch64/emit-relocs-113.d
index 60e40e6ba2b..b892bb658d1 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-113.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-113.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-553.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 00010000 <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-114-overflow.d b/ld/testsuite/ld-aarch64/emit-relocs-114-overflow.d
index 59261734dc2..463c0f1d8b8 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-114-overflow.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-114-overflow.d
@@ -1,5 +1,6 @@
 #source: emit-relocs-554-overflow.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #error: .*\(.text\+0x\d+\): relocation truncated to fit: R_AARCH64_P32_TLSLE_LDST16_TPREL_LO12 against symbol `v2' .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-114.d b/ld/testsuite/ld-aarch64/emit-relocs-114.d
index 96a2501d058..f883afaf2c5 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-114.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-114.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-554.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 00010000 <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-115.d b/ld/testsuite/ld-aarch64/emit-relocs-115.d
index 95a6e317448..da04584315a 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-115.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-115.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-555.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 00010000 <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-116-overflow.d b/ld/testsuite/ld-aarch64/emit-relocs-116-overflow.d
index f060c1731e1..f2ed5fca3ab 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-116-overflow.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-116-overflow.d
@@ -1,5 +1,6 @@
 #source: emit-relocs-556-overflow.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #error: .*\(.text\+0x\d+\): relocation truncated to fit: R_AARCH64_P32_TLSLE_LDST32_TPREL_LO12 against symbol `v2' .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-116.d b/ld/testsuite/ld-aarch64/emit-relocs-116.d
index bd2d6aabf48..4123d9818da 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-116.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-116.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-556.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 00010000 <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-117.d b/ld/testsuite/ld-aarch64/emit-relocs-117.d
index a3bb606bf59..6aede666314 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-117.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-117.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-557.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 00010000 <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-118-overflow.d b/ld/testsuite/ld-aarch64/emit-relocs-118-overflow.d
index 1eedac19d29..61f48e41053 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-118-overflow.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-118-overflow.d
@@ -1,5 +1,6 @@
 #source: emit-relocs-558-overflow.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #error: .*\(.text\+0x\d+\): relocation truncated to fit: R_AARCH64_P32_TLSLE_LDST64_TPREL_LO12 against symbol `v2' .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-118.d b/ld/testsuite/ld-aarch64/emit-relocs-118.d
index 90619742850..c5ec1927124 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-118.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-118.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-558.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 00010000 <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-119.d b/ld/testsuite/ld-aarch64/emit-relocs-119.d
index 20e05eb81bf..cab426952bd 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-119.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-119.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-559.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 00010000 <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-22.d b/ld/testsuite/ld-aarch64/emit-relocs-22.d
index b1e69e06d76..01da7ac900f 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-22.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-22.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-22.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld --defsym foo1=0x12345 --defsym foo2=0x1234 -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 
 .*: +file format .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-23.d b/ld/testsuite/ld-aarch64/emit-relocs-23.d
index abb939d48b6..466081ee16c 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-23.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-23.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-23.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld --defsym foo=0x12345678 -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 
 .*: +file format .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-28.d b/ld/testsuite/ld-aarch64/emit-relocs-28.d
index fd5c71c3b6d..cfc887a71be 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-28.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-28.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-28.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] --defsym globala=0x11000 --defsym globalb=0x45000 --defsym globalc=0x1234  -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 
 .*: +file format .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d b/ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d
index a9781a9515a..924a379efcb 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d
@@ -1,5 +1,6 @@
 #source: emit-relocs-86-overflow.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #error: .*\(.text\+0x\d+\): relocation truncated to fit: R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12 against symbol `v2' .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-86.d b/ld/testsuite/ld-aarch64/emit-relocs-86.d
index 00477853616..bd883d669d8 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-86.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-86.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-86.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 .* <\.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-87.d b/ld/testsuite/ld-aarch64/emit-relocs-87.d
index dce85b6ae5c..ae6bc7eb4c5 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-87.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-87.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-87.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 .* <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-88-overflow.d b/ld/testsuite/ld-aarch64/emit-relocs-88-overflow.d
index cedf505c323..cc0c02db878 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-88-overflow.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-88-overflow.d
@@ -1,5 +1,6 @@
 #source: emit-relocs-88-overflow.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #error: .*\(.text\+0x\d+\): relocation truncated to fit: R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0 against symbol `v2' .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-88.d b/ld/testsuite/ld-aarch64/emit-relocs-88.d
index a6f63208796..0fda7057576 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-88.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-88.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-88.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 .* <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-89.d b/ld/testsuite/ld-aarch64/emit-relocs-89.d
index 33cf0cc7c95..fc1cddc020c 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-89.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-89.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-89.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 .* <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-90-overflow.d b/ld/testsuite/ld-aarch64/emit-relocs-90-overflow.d
index f5f65b518d0..c43898f5552 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-90-overflow.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-90-overflow.d
@@ -1,5 +1,6 @@
 #source: emit-relocs-90-overflow.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #error: .*\(.text\+0x\d+\): relocation truncated to fit: R_AARCH64_P32_TLSLD_ADD_DTPREL_HI12 against symbol `v2' .*
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-90.d b/ld/testsuite/ld-aarch64/emit-relocs-90.d
index d6ef58bae39..cf301d831c3 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-90.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-90.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-90.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 .* <.text>:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-92.d b/ld/testsuite/ld-aarch64/emit-relocs-92.d
index 0ff532b10f7..a0b582a7b89 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-92.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-92.d
@@ -1,6 +1,7 @@
 #source: emit-relocs-92.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -e0 --emit-relocs
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 .* <.text>:
diff --git a/ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d b/ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d
index 2cf42dc634b..911f50eeba8 100644
--- a/ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d
@@ -2,6 +2,7 @@
 #target: [check_shared_lib_support]
 #as: -mabi=ilp32
 #ld: -shared -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	90000080 	adrp	x0, 20000 <_GLOBAL_OFFSET_TABLE_>
diff --git a/ld/testsuite/ld-aarch64/tls-relax-all-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-all-ilp32.d
index 62faed4b73a..2fb172d053e 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-all-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-all-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-all.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	a9bf7bfd 	stp	x29, x30, \[sp, #-16\]!
diff --git a/ld/testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d
index 340206a9e2b..7728178d2c9 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-gd-ie.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 tmpdir/tls-sharedlib-ilp32.so
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	90000080 	adrp	x0, 20000 <_GLOBAL_OFFSET_TABLE_>
diff --git a/ld/testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d
index dd91cb41df4..4b28fc51541 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-gd-le.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	52a00000 	movz	w0, #0x0, lsl #16
diff --git a/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d
index 903b0b4d618..4dca8c5510d 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-gdesc-le-2.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	52a00000 	movz	w0, #0x0, lsl #16
diff --git a/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d
index 020554baa69..e9053fdb876 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-gdesc-le.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	52a00000 	movz	w0, #0x0, lsl #16
diff --git a/ld/testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d
index 71ee72caf0f..7929e3f28a8 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-ie-le-2.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	d53bd041 	mrs	x1, tpidr_el0
diff --git a/ld/testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d
index e0bc05dce41..987559abfc2 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-ie-le-3.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	d53bd042 	mrs	x2, tpidr_el0
diff --git a/ld/testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d
index ede3d8ce0d7..b1e728c73cd 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-ie-le.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	d53bd041 	mrs	x1, tpidr_el0
diff --git a/ld/testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d
index 0f86d932ca5..2b80db5a542 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-ld-le-small.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	910003fd 	mov	x29, sp
diff --git a/ld/testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d b/ld/testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d
index e2a42503f96..445e79dccf6 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-relax-ld-le-tiny.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
  +10000:	910003fd 	mov	x29, sp
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d b/ld/testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d
index 3dffa1b85e6..e8059bbcea4 100644
--- a/ld/testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-tiny-desc-ie.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 tmpdir/tls-sharedlib-ilp32.so
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d b/ld/testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d
index 79a6f5cd586..e9211b229ec 100644
--- a/ld/testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-tiny-desc-le.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d b/ld/testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d
index 6317152eb1e..f79b5eba300 100644
--- a/ld/testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-tiny-gd-ie.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0 tmpdir/tls-sharedlib-ilp32.so
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d b/ld/testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d
index 5213a046c0a..cc13bbde21b 100644
--- a/ld/testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d
@@ -1,6 +1,7 @@
 #source: tls-tiny-gd-le.s
 #as: -mabi=ilp32
 #ld: -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
+#notarget: *-*-nto*
 #objdump: -dr
 #...
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] Add support for aarch64-nto-qnx
  2023-03-16 10:17 [PATCH 0/5] Add support for aarch64-nto-qnx Clément Chigot
                   ` (4 preceding siblings ...)
  2023-03-16 10:17 ` [PATCH 5/5] ld/testsuite: disable ilp32 tests for aarch64-qnx Clément Chigot
@ 2023-03-16 13:02 ` Nick Clifton
  5 siblings, 0 replies; 7+ messages in thread
From: Nick Clifton @ 2023-03-16 13:02 UTC (permalink / raw)
  To: Clément Chigot, binutils

Hi Clément,

> This serie adds support for the QNX Neutrino operating system over
> aarch64 architecture.
> It creates a new aarch64-nto linker emulation applying nto.em
> over aarch64elf.em. For now, this nto.em has not be included
> for other nto targets (sh-nto, arm-nto, etc).

Patch series approved - please apply.

Cheers
   Nick



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-16 13:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 10:17 [PATCH 0/5] Add support for aarch64-nto-qnx Clément Chigot
2023-03-16 10:17 ` [PATCH 1/5] configure: add new target aarch64-*-nto* Clément Chigot
2023-03-16 10:17 ` [PATCH 2/5] readelf: add support for QNT_STACK note subsections Clément Chigot
2023-03-16 10:17 ` [PATCH 3/5] ld: add support of QNX stack arguments for aarch64nto Clément Chigot
2023-03-16 10:17 ` [PATCH 4/5] ld/testsuite: add aarch64nto to ld-aarch64 Clément Chigot
2023-03-16 10:17 ` [PATCH 5/5] ld/testsuite: disable ilp32 tests for aarch64-qnx Clément Chigot
2023-03-16 13:02 ` [PATCH 0/5] Add support for aarch64-nto-qnx Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).