mbox series

[ARM-FDPIC,00/12] FDPIC ABI for ARM

Message ID 20180322143850.1766-1-christophe.lyon@st.com
Headers show
Series FDPIC ABI for ARM | expand

Message

Christophe Lyon March 22, 2018, 2:38 p.m. UTC
Hello,

This patch series implements the binutils contribution of the FDPIC
ABI for ARM targets. As such, it is mainly a linker development, with
small additions to the assembler and other binary utilities.

This ABI enables to run Linux on ARM MMU-less cores and supports
shared libraries to reduce the memory footprint.

Without MMU, text and data segment relative distances are different
from one process to another, hence the need for a dedicated FDPIC
register holding the start address of the data segment. One of the
side effects is that function pointers require two words to be
represented: the address of the code, and the data segment start
address. These two words are designated as "Function Descriptor",
hence the "FD PIC" name.

On ARM, the FDPIC register is r9 [3], and the intended target name is
arm-linux-uclibceabi, although arm-linux-gnueabi works too. Note that
arm-uclinux exists, but uses another ABI and the BFLAT file format; it
does not support code sharing.

This work was developed some time ago by STMicroelectronics, and was
presented during Linaro Connect SFO15 (September 2015). You can watch
the discussion and read the slides [1].
This presentation was related to the toolchain published on github [2],
which is based on binutils-2.22, gcc-4.7, uclibc-0.9.33.2, gdb-7.5.1
and qemu-2.3.0, and for which pre-built binaries are available [2].

The ABI itself is described in details in [3].

Our Linux kernel patches have been updated and committed by Nicolas
Pitre (Linaro) in July 2017. They are required so that the loader is
able to handle this new file type. Indeed, the ELF files are tagged
with ELFOSABI_ARM_FDPIC. This new tag has been allocated by ARM, as
well as the new relocations involved.

This patch series has been rebased on top of binutils from 2018-03-14,
and is also available from my git branch (users/clyon/arm-fdpic on
sourceware) [4].

I have also rebased the GCC patch series, but it is still WIP as
cleanup is still needed before I can request a review. It can be
useful to build a preview toolchain though, so my WIP branch is
available at [5].
To build such a toolchain, you'd also need to use my uClibc
branch [6].

In order to execute programs, you'd also need to use this qemu
branch [7].

I am currently working on updating the patches for the other toolchain
components, and will upstream them soon. This includes gcc, uclibc,
gdb and qemu.

This series provides support for ARM v7 and later architectures and
has been tested on arm-linux-gnueabi without regression, as well as
arm-linux-uclibceabi.

Are the binutils patches OK for inclusion in master?

Thanks,

Christophe.


[1] http://connect.linaro.org/resource/sfo15/sfo15-406-arm-fdpic-toolset-kernel-libraries-for-cortex-m-cortex-r-mmuless-cores/
[2] https://github.com/mickael-guene/fdpic_manifest
[3] https://github.com/mickael-guene/fdpic_doc/blob/master/abi.txt
[4] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=shortlog;h=refs/heads/users/clyon/arm-fdpic
[5] https://git.linaro.org/people/christophe.lyon/gcc.git/log/?h=fdpic-upstream
[6] https://git.linaro.org/people/christophe.lyon/uclibc.git/log/?h=uClibc-0.9.33.2-fdpic-upstream
[7] https://git.linaro.org/people/christophe.lyon/qemu.git/log/?h=qemu-2.8.0-fdpic-upstream

Christophe Lyon (12):
  [ARM] Add armelf_linux_fdpiceabi and armelfb_linux_fdpiceabi BFD
    backends
  [ARM] Add FDPIC OSABI flag support.
  [ARM] Add FDPIC relocations definitions
  [ARM] Implement FDPIC relocations.
  [ARM] Implement PLT for FDPIC.
  [ARM] Add TLS relocations for FDPIC.
  [ARM] FDPIC: Add stack segment
  [ARM] FDPIC: Translate R_ARM_TARGET2 relocation into R_ARM_GOT32
    relocation for FDPIC platform
  [ARM] FDPIC: Make _GLOBAL_OFFSET_TABLE_ a relative symbol
  [ARM] FDPIC: Fix ld testcase not to conflict with uclibc's includes.
  [ARM] FDPIC: New tests.
  [ARM] FDPIC: Implement Thumb-only PLT for FDPIC.

 bfd/bfd-in2.h                            |    9 +
 bfd/config.bfd                           |    4 +-
 bfd/configure                            |    2 +
 bfd/configure.ac                         |    2 +
 bfd/elf32-arm.c                          | 1123 ++++++++++++++++++++++++++++--
 bfd/reloc.c                              |   17 +
 bfd/targets.c                            |    4 +
 binutils/readelf.c                       |    7 +
 gas/config/tc-arm.c                      |   85 ++-
 gas/testsuite/gas/arm/reloc-fdpic.d      |   20 +
 gas/testsuite/gas/arm/reloc-fdpic.s      |    9 +
 include/elf/arm.h                        |    7 +
 include/elf/common.h                     |    1 +
 ld/Makefile.am                           |   13 +
 ld/Makefile.in                           |   15 +
 ld/configure.tgt                         |    4 +-
 ld/emulparams/armelf_linux_fdpiceabi.sh  |   17 +
 ld/emulparams/armelfb_linux_fdpiceabi.sh |    2 +
 ld/scripttempl/elf.sc                    |    6 +-
 ld/testsuite/ld-arm/arm-elf.exp          |   37 +
 ld/testsuite/ld-arm/fdpic-main-m.d       |   73 ++
 ld/testsuite/ld-arm/fdpic-main-m.s       |   86 +++
 ld/testsuite/ld-arm/fdpic-main-m.sym     |   14 +
 ld/testsuite/ld-arm/fdpic-main.d         |   72 ++
 ld/testsuite/ld-arm/fdpic-main.ld        |  244 +++++++
 ld/testsuite/ld-arm/fdpic-main.r         |   11 +
 ld/testsuite/ld-arm/fdpic-main.s         |   86 +++
 ld/testsuite/ld-arm/fdpic-main.sym       |   14 +
 ld/testsuite/ld-arm/fdpic-shared-m.d     |   37 +
 ld/testsuite/ld-arm/fdpic-shared-m.s     |   52 ++
 ld/testsuite/ld-arm/fdpic-shared-m.sym   |   15 +
 ld/testsuite/ld-arm/fdpic-shared.d       |   35 +
 ld/testsuite/ld-arm/fdpic-shared.ld      |  228 ++++++
 ld/testsuite/ld-arm/fdpic-shared.r       |    8 +
 ld/testsuite/ld-arm/fdpic-shared.s       |   52 ++
 ld/testsuite/ld-arm/fdpic-shared.sym     |   15 +
 ld/testsuite/ld-elf/pr2404b.c            |    8 +-
 37 files changed, 2364 insertions(+), 70 deletions(-)
 create mode 100644 gas/testsuite/gas/arm/reloc-fdpic.d
 create mode 100644 gas/testsuite/gas/arm/reloc-fdpic.s
 create mode 100644 ld/emulparams/armelf_linux_fdpiceabi.sh
 create mode 100644 ld/emulparams/armelfb_linux_fdpiceabi.sh
 create mode 100644 ld/testsuite/ld-arm/fdpic-main-m.d
 create mode 100644 ld/testsuite/ld-arm/fdpic-main-m.s
 create mode 100644 ld/testsuite/ld-arm/fdpic-main-m.sym
 create mode 100644 ld/testsuite/ld-arm/fdpic-main.d
 create mode 100644 ld/testsuite/ld-arm/fdpic-main.ld
 create mode 100644 ld/testsuite/ld-arm/fdpic-main.r
 create mode 100644 ld/testsuite/ld-arm/fdpic-main.s
 create mode 100644 ld/testsuite/ld-arm/fdpic-main.sym
 create mode 100644 ld/testsuite/ld-arm/fdpic-shared-m.d
 create mode 100644 ld/testsuite/ld-arm/fdpic-shared-m.s
 create mode 100644 ld/testsuite/ld-arm/fdpic-shared-m.sym
 create mode 100644 ld/testsuite/ld-arm/fdpic-shared.d
 create mode 100644 ld/testsuite/ld-arm/fdpic-shared.ld
 create mode 100644 ld/testsuite/ld-arm/fdpic-shared.r
 create mode 100644 ld/testsuite/ld-arm/fdpic-shared.s
 create mode 100644 ld/testsuite/ld-arm/fdpic-shared.sym

-- 
2.6.3

Comments

Joseph Myers March 22, 2018, 5:08 p.m. UTC | #1
On Thu, 22 Mar 2018, Christophe Lyon wrote:

> On ARM, the FDPIC register is r9 [3], and the intended target name is

> arm-linux-uclibceabi, although arm-linux-gnueabi works too. Note that


arm-*-linux-uclibceabi already means normal non-FDPIC Linux with uClibc 
(that is, with uClibc by default; -mglibc and -muclibc can be used to 
select a multilib with different libc from the default one in a toolchain 
built with such multilibs).

> arm-uclinux exists, but uses another ABI and the BFLAT file format; it

> does not support code sharing.


But -uclinux* targets are the appropriate ones for MMU-less 
configurations.  It's possible you need a new variant such as 
arm-*-uclinuxfdpiceabi.

-- 
Joseph S. Myers
joseph@codesourcery.com
Christophe Lyon March 23, 2018, 7:59 a.m. UTC | #2
On 22/03/2018 18:08, Joseph Myers wrote:
> On Thu, 22 Mar 2018, Christophe Lyon wrote:

> 

>> On ARM, the FDPIC register is r9 [3], and the intended target name is

>> arm-linux-uclibceabi, although arm-linux-gnueabi works too. Note that

> 

> arm-*-linux-uclibceabi already means normal non-FDPIC Linux with uClibc

> (that is, with uClibc by default; -mglibc and -muclibc can be used to

> select a multilib with different libc from the default one in a toolchain

> built with such multilibs).

> 

Thanks for the clarification.

>> arm-uclinux exists, but uses another ABI and the BFLAT file format; it

>> does not support code sharing.

> 

> But -uclinux* targets are the appropriate ones for MMU-less

> configurations.  It's possible you need a new variant such as

> arm-*-uclinuxfdpiceabi.

> 


I did wonder about the right option, and looked at other targets,
but couldn't figure out the right choice.
Something like arm-*-uclinuxfdpiceabi is probably the right choice
as you suggest.

I'll check that and update the patches accordingly. It should be
only a cosmetic, mechanical change, though quite important.

I think it does not prevent from getting feedback on the rest of the series.

Thanks for your prompt feedback!

Christophe
Nick Clifton March 23, 2018, 3:08 p.m. UTC | #3
Hi Christophe,

  As a first pass over this patch set, I applied them to the sources
  and ran my regression tests.  Unfortunately there were several new
  failures:

Checking Binutils in: arm-none-eabi ... LD: 6  done
  LD REGRESSION: FDPIC ARM shared library little
  LD REGRESSION: FDPIC ARM dynamic executable little
  LD REGRESSION: FDPIC ARM shared library big
  LD REGRESSION: FDPIC ARM dynamic executable big
  LD REGRESSION: FDPIC ARM shared library little endian M profile
  LD REGRESSION: FDPIC ARM dynamic executable little endian M profile
Checking Binutils in: armeb-eabi ... LD: 6  done
  LD REGRESSION: FDPIC ARM shared library little
  LD REGRESSION: FDPIC ARM dynamic executable little
  LD REGRESSION: FDPIC ARM shared library big
  LD REGRESSION: FDPIC ARM dynamic executable big
  LD REGRESSION: FDPIC ARM shared library little endian M profile
  LD REGRESSION: FDPIC ARM dynamic executable little endian M profile

It seems that these tests are all failing for the same reason:

  ld-new: unrecognised emulation mode: armelf_linux_fdpiceabi


Checking Binutils in: arm-netbsdelf ... GAS: 1  LD: 2  done
  GAS REGRESSION: FDPIC relocations   
Checking Binutils in: arm-nto ... GAS: 1  done
  GAS REGRESSION: FDPIC relocations   

Meanwhile these tests fail for a similar, but not quite the same reason:

  Fatal error: selected target format 'elf32-littlearm-fdpic' unknown

Would you mind fixing these up please ?

Cheers
  Nick
Christophe Lyon March 26, 2018, 12:33 p.m. UTC | #4
Hi Nick,

On 23/03/2018 16:08, Nick Clifton wrote:
> Hi Christophe,

> 

>    As a first pass over this patch set, I applied them to the sources

>    and ran my regression tests.  Unfortunately there were several new

>    failures:

> 


Thanks for your interest in this patch series.

> Checking Binutils in: arm-none-eabi ... LD: 6  done

>    LD REGRESSION: FDPIC ARM shared library little

>    LD REGRESSION: FDPIC ARM dynamic executable little

>    LD REGRESSION: FDPIC ARM shared library big

>    LD REGRESSION: FDPIC ARM dynamic executable big

>    LD REGRESSION: FDPIC ARM shared library little endian M profile

>    LD REGRESSION: FDPIC ARM dynamic executable little endian M profile

> Checking Binutils in: armeb-eabi ... LD: 6  done

>    LD REGRESSION: FDPIC ARM shared library little

>    LD REGRESSION: FDPIC ARM dynamic executable little

>    LD REGRESSION: FDPIC ARM shared library big

>    LD REGRESSION: FDPIC ARM dynamic executable big

>    LD REGRESSION: FDPIC ARM shared library little endian M profile

>    LD REGRESSION: FDPIC ARM dynamic executable little endian M profile

> 

> It seems that these tests are all failing for the same reason:

> 

>    ld-new: unrecognised emulation mode: armelf_linux_fdpiceabi

> 

> 

> Checking Binutils in: arm-netbsdelf ... GAS: 1  LD: 2  done

>    GAS REGRESSION: FDPIC relocations

> Checking Binutils in: arm-nto ... GAS: 1  done

>    GAS REGRESSION: FDPIC relocations

> 

> Meanwhile these tests fail for a similar, but not quite the same reason:

> 

>    Fatal error: selected target format 'elf32-littlearm-fdpic' unknown

> 

> Would you mind fixing these up please ?

> 


I'm looking at it. All these failures are caused by the tests added by this series.

I did test them on arm-linux-gnueabihf, armeb-linux-gnueabihf and-linux-uclibceabi,
but overlooked testing on arm-eabi and others. As usual, not tested means it
does not work :(

My homework on de-hardcoding things is obviously not complete :)


The simple route would probably be just to skip the tests on those targets,
but I have been trying to do something better, but didn't succeed so far.

Currently, gas sets the OSABI flag to ELFOSABI_ARM_FDPIC if the user
supplied -fdpic. I think this flag should set the linker in the right
mode (fdpic/no-fdpic).

It seems I have to set arm_elf32_fdpic_le_vec as default (targ_defvec in config.bfd),
such that the linker uses that in priority (otherwise arm_elf32_le_vec also
accepts to read an FDPIC object file, but fails to flag it as "FDPIC" (because
elf-object_p is happy with ELFOSABI_NONE).

However, if I do that, the linker then defaults to generating FDPIC files,
and thus breaks arm-linux-gnueabihf, unless I force -m armelf_linux_eabi.

I have looked at other targets, for instance sh adds -m shelf_fd for its fdpic tests.
That's what the patches I have posted do. Is this the only way?

How can I have ld support both models transparently without needing to use -m ?

Thanks,

Christophe


> Cheers

>    Nick

> .

>
Christophe Lyon March 26, 2018, 8:36 p.m. UTC | #5
On 26 March 2018 at 14:33, Christophe Lyon <christophe.lyon@st.com> wrote:
> Hi Nick,

>

> On 23/03/2018 16:08, Nick Clifton wrote:

>>

>> Hi Christophe,

>>

>>    As a first pass over this patch set, I applied them to the sources

>>    and ran my regression tests.  Unfortunately there were several new

>>    failures:

>>

>

> Thanks for your interest in this patch series.

>

>> Checking Binutils in: arm-none-eabi ... LD: 6  done

>>    LD REGRESSION: FDPIC ARM shared library little

>>    LD REGRESSION: FDPIC ARM dynamic executable little

>>    LD REGRESSION: FDPIC ARM shared library big

>>    LD REGRESSION: FDPIC ARM dynamic executable big

>>    LD REGRESSION: FDPIC ARM shared library little endian M profile

>>    LD REGRESSION: FDPIC ARM dynamic executable little endian M profile

>> Checking Binutils in: armeb-eabi ... LD: 6  done

>>    LD REGRESSION: FDPIC ARM shared library little

>>    LD REGRESSION: FDPIC ARM dynamic executable little

>>    LD REGRESSION: FDPIC ARM shared library big

>>    LD REGRESSION: FDPIC ARM dynamic executable big

>>    LD REGRESSION: FDPIC ARM shared library little endian M profile

>>    LD REGRESSION: FDPIC ARM dynamic executable little endian M profile

>>

>> It seems that these tests are all failing for the same reason:

>>

>>    ld-new: unrecognised emulation mode: armelf_linux_fdpiceabi

>>

>>

>> Checking Binutils in: arm-netbsdelf ... GAS: 1  LD: 2  done

>>    GAS REGRESSION: FDPIC relocations

>> Checking Binutils in: arm-nto ... GAS: 1  done

>>    GAS REGRESSION: FDPIC relocations

>>

>> Meanwhile these tests fail for a similar, but not quite the same reason:

>>

>>    Fatal error: selected target format 'elf32-littlearm-fdpic' unknown

>>

>> Would you mind fixing these up please ?

>>


Hi Nick,

The attached patch avoids running the new tests on unsupported targets.

Thanks,

Christophe

>

> I'm looking at it. All these failures are caused by the tests added by this

> series.

>

> I did test them on arm-linux-gnueabihf, armeb-linux-gnueabihf

> and-linux-uclibceabi,

> but overlooked testing on arm-eabi and others. As usual, not tested means it

> does not work :(

>

> My homework on de-hardcoding things is obviously not complete :)

>

>

> The simple route would probably be just to skip the tests on those targets,

> but I have been trying to do something better, but didn't succeed so far.

>

> Currently, gas sets the OSABI flag to ELFOSABI_ARM_FDPIC if the user

> supplied -fdpic. I think this flag should set the linker in the right

> mode (fdpic/no-fdpic).

>

> It seems I have to set arm_elf32_fdpic_le_vec as default (targ_defvec in

> config.bfd),

> such that the linker uses that in priority (otherwise arm_elf32_le_vec also

> accepts to read an FDPIC object file, but fails to flag it as "FDPIC"

> (because

> elf-object_p is happy with ELFOSABI_NONE).

>

> However, if I do that, the linker then defaults to generating FDPIC files,

> and thus breaks arm-linux-gnueabihf, unless I force -m armelf_linux_eabi.

>

> I have looked at other targets, for instance sh adds -m shelf_fd for its

> fdpic tests.

> That's what the patches I have posted do. Is this the only way?

>

> How can I have ld support both models transparently without needing to use

> -m ?

>

> Thanks,

>

> Christophe

>

>

>> Cheers

>>    Nick

>> .

>>

>
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 216b98b..f62808f 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -20359,7 +20359,7 @@ elf32_arm_nacl_plt_sym_val (bfd_vma i, const asection *plt,
 #undef  TARGET_BIG_NAME
 #define TARGET_BIG_NAME			"elf32-bigarm-fdpic"
 #undef elf_match_priority
-#define elf_match_priority		128
+#define elf_match_priority		1
 #undef ELF_OSABI
 #define ELF_OSABI		ELFOSABI_ARM_FDPIC
 
@@ -20377,6 +20377,8 @@ elf32_arm_fdpic_link_hash_table_create (bfd *abfd)
       struct elf32_arm_link_hash_table *htab = (struct elf32_arm_link_hash_table *) ret;
 
       htab->fdpic_p = 1;
+      //      _bfd_error_handler (_("%pB: ENTERED FDPIC MODE"),
+      //			  abfd);
     }
   return ret;
 }
diff --git a/gas/testsuite/gas/arm/reloc-fdpic.d b/gas/testsuite/gas/arm/reloc-fdpic.d
index 768c3a1..bedb2ff 100644
--- a/gas/testsuite/gas/arm/reloc-fdpic.d
+++ b/gas/testsuite/gas/arm/reloc-fdpic.d
@@ -2,7 +2,7 @@
 #objdump: -dr --show-raw-insn
 #name: FDPIC relocations
 # This test is only valid on ELF based ports.
-#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+#not-skip: *-*-uclibceabi
 
 .*: +file format .*arm.*
 
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 00960db..230728e 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -1016,7 +1016,9 @@ set armeabitests_nonacl {
      "" {preempt-app.s}
      {{readelf -Ds preempt-app.sym}}
      "preempt-app"}
+}
 
+set armfdpiceabitests {
     {"FDPIC ARM shared library little endian"
      "-shared -T fdpic-shared.ld --hash-style=sysv -EL -m armelf_linux_fdpiceabi" ""
      "-EL -fdpic" {fdpic-shared.s}
@@ -1081,6 +1083,10 @@ if { !$is_nacl } {
     run_ld_link_tests $armeabitests_nonacl
 }
 
+if { [istarget "arm*-linux-uclibceaci"] } {
+    run_ld_link_tests $armfdpiceabitests
+}
+
 run_dump_test "attr-merge-div-00"
 run_dump_test "attr-merge-div-01"
 run_dump_test "attr-merge-div-10"
Christophe Lyon March 27, 2018, 8:47 a.m. UTC | #6
On 26 March 2018 at 22:36, Christophe Lyon <christophe.lyon@linaro.org> wrote:
> On 26 March 2018 at 14:33, Christophe Lyon <christophe.lyon@st.com> wrote:

>> Hi Nick,

>>

>> On 23/03/2018 16:08, Nick Clifton wrote:

>>>

>>> Hi Christophe,

>>>

>>>    As a first pass over this patch set, I applied them to the sources

>>>    and ran my regression tests.  Unfortunately there were several new

>>>    failures:

>>>

>>

>> Thanks for your interest in this patch series.

>>

>>> Checking Binutils in: arm-none-eabi ... LD: 6  done

>>>    LD REGRESSION: FDPIC ARM shared library little

>>>    LD REGRESSION: FDPIC ARM dynamic executable little

>>>    LD REGRESSION: FDPIC ARM shared library big

>>>    LD REGRESSION: FDPIC ARM dynamic executable big

>>>    LD REGRESSION: FDPIC ARM shared library little endian M profile

>>>    LD REGRESSION: FDPIC ARM dynamic executable little endian M profile

>>> Checking Binutils in: armeb-eabi ... LD: 6  done

>>>    LD REGRESSION: FDPIC ARM shared library little

>>>    LD REGRESSION: FDPIC ARM dynamic executable little

>>>    LD REGRESSION: FDPIC ARM shared library big

>>>    LD REGRESSION: FDPIC ARM dynamic executable big

>>>    LD REGRESSION: FDPIC ARM shared library little endian M profile

>>>    LD REGRESSION: FDPIC ARM dynamic executable little endian M profile

>>>

>>> It seems that these tests are all failing for the same reason:

>>>

>>>    ld-new: unrecognised emulation mode: armelf_linux_fdpiceabi

>>>

>>>

>>> Checking Binutils in: arm-netbsdelf ... GAS: 1  LD: 2  done

>>>    GAS REGRESSION: FDPIC relocations

>>> Checking Binutils in: arm-nto ... GAS: 1  done

>>>    GAS REGRESSION: FDPIC relocations

>>>

>>> Meanwhile these tests fail for a similar, but not quite the same reason:

>>>

>>>    Fatal error: selected target format 'elf32-littlearm-fdpic' unknown

>>>

>>> Would you mind fixing these up please ?

>>>

>

> Hi Nick,

>

> The attached patch avoids running the new tests on unsupported targets.

>


Of course, the first two chunks are not part of what I meant to send.
Cleaned-up patch attached.

Christophe

> Thanks,

>

> Christophe

>

>>

>> I'm looking at it. All these failures are caused by the tests added by this

>> series.

>>

>> I did test them on arm-linux-gnueabihf, armeb-linux-gnueabihf

>> and-linux-uclibceabi,

>> but overlooked testing on arm-eabi and others. As usual, not tested means it

>> does not work :(

>>

>> My homework on de-hardcoding things is obviously not complete :)

>>

>>

>> The simple route would probably be just to skip the tests on those targets,

>> but I have been trying to do something better, but didn't succeed so far.

>>

>> Currently, gas sets the OSABI flag to ELFOSABI_ARM_FDPIC if the user

>> supplied -fdpic. I think this flag should set the linker in the right

>> mode (fdpic/no-fdpic).

>>

>> It seems I have to set arm_elf32_fdpic_le_vec as default (targ_defvec in

>> config.bfd),

>> such that the linker uses that in priority (otherwise arm_elf32_le_vec also

>> accepts to read an FDPIC object file, but fails to flag it as "FDPIC"

>> (because

>> elf-object_p is happy with ELFOSABI_NONE).

>>

>> However, if I do that, the linker then defaults to generating FDPIC files,

>> and thus breaks arm-linux-gnueabihf, unless I force -m armelf_linux_eabi.

>>

>> I have looked at other targets, for instance sh adds -m shelf_fd for its

>> fdpic tests.

>> That's what the patches I have posted do. Is this the only way?

>>

>> How can I have ld support both models transparently without needing to use

>> -m ?

>>

>> Thanks,

>>

>> Christophe

>>

>>

>>> Cheers

>>>    Nick

>>> .

>>>

>>
diff --git a/gas/testsuite/gas/arm/reloc-fdpic.d b/gas/testsuite/gas/arm/reloc-fdpic.d
index 768c3a1..bedb2ff 100644
--- a/gas/testsuite/gas/arm/reloc-fdpic.d
+++ b/gas/testsuite/gas/arm/reloc-fdpic.d
@@ -2,7 +2,7 @@
 #objdump: -dr --show-raw-insn
 #name: FDPIC relocations
 # This test is only valid on ELF based ports.
-#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+#not-skip: *-*-uclibceabi
 
 .*: +file format .*arm.*
 
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 00960db..230728e 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -1016,7 +1016,9 @@ set armeabitests_nonacl {
      "" {preempt-app.s}
      {{readelf -Ds preempt-app.sym}}
      "preempt-app"}
+}
 
+set armfdpiceabitests {
     {"FDPIC ARM shared library little endian"
      "-shared -T fdpic-shared.ld --hash-style=sysv -EL -m armelf_linux_fdpiceabi" ""
      "-EL -fdpic" {fdpic-shared.s}
@@ -1081,6 +1083,10 @@ if { !$is_nacl } {
     run_ld_link_tests $armeabitests_nonacl
 }
 
+if { [istarget "arm*-linux-uclibceaci"] } {
+    run_ld_link_tests $armfdpiceabitests
+}
+
 run_dump_test "attr-merge-div-00"
 run_dump_test "attr-merge-div-01"
 run_dump_test "attr-merge-div-10"
Nick Clifton April 5, 2018, 8:07 a.m. UTC | #7
Hi Christophe,

  Thanks for the revised patch set.  I have run them through their
  paces and everything seems fine now, so please go ahead and commit.

Cheers
  Nick
Christophe Lyon April 5, 2018, 12:45 p.m. UTC | #8
On 5 April 2018 at 10:07, Nick Clifton <nickc@redhat.com> wrote:
> Hi Christophe,

>

>   Thanks for the revised patch set.  I have run them through their

>   paces and everything seems fine now, so please go ahead and commit.

>

> Cheers

>   Nick

>

>


Hi Nick,

Thanks, this is great news!

What about Joseph's request to use another target name (such as
arm-uclinuxfdpiceabi)?

Do you want me to change it? If so, I guess I can either:
- commit the patches I posted, and commit the target change later
- update the patches, commit the updated version and post it here for reference

Do you have a preference or another suggestion?

Thanks,

Christophe
Christophe Lyon April 19, 2018, 7:01 a.m. UTC | #9
On 05/04/2018 14:45, Christophe Lyon wrote:
> On 5 April 2018 at 10:07, Nick Clifton <nickc@redhat.com> wrote:

>> Hi Christophe,

>>

>>    Thanks for the revised patch set.  I have run them through their

>>    paces and everything seems fine now, so please go ahead and commit.

>>

>> Cheers

>>    Nick

>>

>>

> Hi Nick,

>

> Thanks, this is great news!

>

> What about Joseph's request to use another target name (such as

> arm-uclinuxfdpiceabi)?

>

> Do you want me to change it? If so, I guess I can either:

> - commit the patches I posted, and commit the target change later

> - update the patches, commit the updated version and post it here for reference

>

> Do you have a preference or another suggestion?


I have posted an updated version of patch #1, such that is uses arm-uclinuxfdpiceabi as target name.

Here is an additional testsuite-only patch, such that as many tests pass as with the previous target name.
Is this too invasive?

Thanks,

Christophe

> Thanks,

>

> Christophe

> .

>
commit ece061139997cf0d99927edd902bb8df20d74a86
Author: Christophe Lyon <christophe.lyon@st.com>
Date:   Wed Apr 18 20:55:29 2018 +0000

    Update testsuite for new target name.

diff --git a/binutils/testsuite/binutils-all/elfedit-2.d b/binutils/testsuite/binutils-all/elfedit-2.d
index 56468b5..b32b97c 100644
--- a/binutils/testsuite/binutils-all/elfedit-2.d
+++ b/binutils/testsuite/binutils-all/elfedit-2.d
@@ -3,7 +3,7 @@
 #source: empty.s
 #readelf: -h
 #name: Update ELF header 2
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
 ELF Header:
diff --git a/binutils/testsuite/binutils-all/elfedit-3.d b/binutils/testsuite/binutils-all/elfedit-3.d
index 219cac5..df5ee97 100644
--- a/binutils/testsuite/binutils-all/elfedit-3.d
+++ b/binutils/testsuite/binutils-all/elfedit-3.d
@@ -3,7 +3,7 @@
 #source: empty.s
 #readelf: -h
 #name: Update ELF header 3
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
 ELF Header:
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index f7b811c..b7f4410 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -570,7 +570,7 @@ proc copy_setup { } {
     set res [build_wrapper testglue.o]
     set flags { debug }
 
-    if { [istarget *-*-uclinux*] && ![istarget tic6x-*-*] } {
+    if { [istarget *-*-uclinux*] && ![istarget tic6x-*-*] && ![istarget arm*-*-uclinuxfdpiceabi] } {
 	return 1
     }
 
diff --git a/binutils/testsuite/binutils-all/strip-3.d b/binutils/testsuite/binutils-all/strip-3.d
index 0b4cded..190298c 100644
--- a/binutils/testsuite/binutils-all/strip-3.d
+++ b/binutils/testsuite/binutils-all/strip-3.d
@@ -3,7 +3,7 @@
 #strip: -R .text -R .data -R .bss -R .ARM.attributes -R .reginfo -R .gnu.attributes -R .MIPS.abiflags -R .pdr -R .xtensa.info -R .ARC.attributes
 #readelf: -S --wide
 #name: strip empty file
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0]+\][ \t]+NULL[ \t]+.*
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 8cd569b..b94eeac 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -42,6 +42,7 @@ proc is_elf_format {} {
 	 && ![istarget *-*-sysv4*]
 	 && ![istarget *-*-unixware*]
 	 && ![istarget *-*-wasm32*]
+	 && ![istarget arm*-*-uclinuxfdpiceabi]
 	 && ![istarget avr-*-*]
 	 && ![istarget bfin-*-uclinux]
 	 && ![istarget frv-*-uclinux*]
diff --git a/gas/testsuite/gas/arm/reloc-fdpic.d b/gas/testsuite/gas/arm/reloc-fdpic.d
index bedb2ff..c25aa80 100644
--- a/gas/testsuite/gas/arm/reloc-fdpic.d
+++ b/gas/testsuite/gas/arm/reloc-fdpic.d
@@ -2,7 +2,7 @@
 #objdump: -dr --show-raw-insn
 #name: FDPIC relocations
 # This test is only valid on ELF based ports.
-#not-skip: *-*-uclibceabi
+#not-skip: arm*-*-uclinuxfdpiceabi
 
 .*: +file format .*arm.*
 
diff --git a/ld/testsuite/ld-arm/export-class.exp b/ld/testsuite/ld-arm/export-class.exp
index 7363d6d..697d2d9 100644
--- a/ld/testsuite/ld-arm/export-class.exp
+++ b/ld/testsuite/ld-arm/export-class.exp
@@ -26,13 +26,13 @@
 
 # Exclude non-Linux targets; feel free to include your favorite one
 # if you like.
-if { ![istarget arm*-*-linux*] } {
+if { ![istarget arm*-*-linux*] && ![istarget arm*-*-uclinuxfdpiceabi] } {
     return
 }
 
 set testname "ARM symbol export class test"
 
-if [istarget arm*-*-linux-*eabi*] {
+if { [istarget arm*-*-linux-*eabi*] || [ istarget arm*-*-uclinuxfdpiceabi] } {
     set emul armelf_linux_eabi
 } else {
     set emul armelf_linux
diff --git a/ld/testsuite/ld-discard/discard.exp b/ld/testsuite/ld-discard/discard.exp
index 1a9a38e..de687ef 100644
--- a/ld/testsuite/ld-discard/discard.exp
+++ b/ld/testsuite/ld-discard/discard.exp
@@ -29,6 +29,7 @@ if { ![istarget *-*-linux*]
      && ![istarget *-*-gnu*]
      && ![istarget *-*-nacl*]
      && ![istarget hppa*64*-*-hpux*]
+     && ![istarget arm*-*-uclinuxfdpiceabi]
      && ![istarget *-*-elf] } {
     return
 }
diff --git a/ld/testsuite/ld-elf/binutils.exp b/ld/testsuite/ld-elf/binutils.exp
index 290f158..13d8fab 100644
--- a/ld/testsuite/ld-elf/binutils.exp
+++ b/ld/testsuite/ld-elf/binutils.exp
@@ -24,6 +24,7 @@
 # Make sure that binutils can correctly handle ld output in ELF.
 
 if { ![istarget *-*-linux*]
+     && ![istarget arm*-*-uclinuxfdpiceabi]
      && ![istarget *-*-nacl*]
      && ![istarget *-*-gnu*]} {
     return
diff --git a/ld/testsuite/ld-elf/commonpage1.d b/ld/testsuite/ld-elf/commonpage1.d
index 2b17574..e3f5037 100644
--- a/ld/testsuite/ld-elf/commonpage1.d
+++ b/ld/testsuite/ld-elf/commonpage1.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -z max-page-size=0x200000 -z common-page-size=0x100000
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD+.*0x200000
diff --git a/ld/testsuite/ld-elf/compress1c.d b/ld/testsuite/ld-elf/compress1c.d
index 90abe0f..73f716e 100644
--- a/ld/testsuite/ld-elf/compress1c.d
+++ b/ld/testsuite/ld-elf/compress1c.d
@@ -2,7 +2,7 @@
 #as: --compress-debug-sections
 #ld: -shared
 #readelf: -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/compressed1b.d b/ld/testsuite/ld-elf/compressed1b.d
index 34dfe8e..dee8f65 100644
--- a/ld/testsuite/ld-elf/compressed1b.d
+++ b/ld/testsuite/ld-elf/compressed1b.d
@@ -2,7 +2,7 @@
 #as: --compress-debug-sections=zlib-gabi
 #ld: -r --compress-debug-sections=none
 #readelf: -t
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/compressed1c.d b/ld/testsuite/ld-elf/compressed1c.d
index 29e91da..7fc57ef 100644
--- a/ld/testsuite/ld-elf/compressed1c.d
+++ b/ld/testsuite/ld-elf/compressed1c.d
@@ -2,7 +2,7 @@
 #as: --compress-debug-sections=zlib-gabi
 #ld: -shared --compress-debug-sections=none
 #readelf: -t
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/compressed1e.d b/ld/testsuite/ld-elf/compressed1e.d
index fa2c93b..7d9f13f 100644
--- a/ld/testsuite/ld-elf/compressed1e.d
+++ b/ld/testsuite/ld-elf/compressed1e.d
@@ -2,7 +2,7 @@
 #as: --compress-debug-sections=none
 #ld: -shared --compress-debug-sections=zlib-gnu
 #readelf: -SW
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #notarget: cris*-*-elf frv-*-*
 
 #failif
diff --git a/ld/testsuite/ld-elf/dynamic1.d b/ld/testsuite/ld-elf/dynamic1.d
index 6a8ba55..a4bbe3c 100644
--- a/ld/testsuite/ld-elf/dynamic1.d
+++ b/ld/testsuite/ld-elf/dynamic1.d
@@ -1,6 +1,6 @@
 #ld: -shared -T dynamic1.ld
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  Section to Segment mapping:
diff --git a/ld/testsuite/ld-elf/dynsym1.d b/ld/testsuite/ld-elf/dynsym1.d
index b354aae..273ce3d 100644
--- a/ld/testsuite/ld-elf/dynsym1.d
+++ b/ld/testsuite/ld-elf/dynsym1.d
@@ -1,7 +1,7 @@
 #source: empty.s
 #ld: -shared
 #readelf: --dyn-syms
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +[1-9] _start
diff --git a/ld/testsuite/ld-elf/ehdr_start-missing.d b/ld/testsuite/ld-elf/ehdr_start-missing.d
index 046e39a..259b081 100644
--- a/ld/testsuite/ld-elf/ehdr_start-missing.d
+++ b/ld/testsuite/ld-elf/ehdr_start-missing.d
@@ -1,4 +1,4 @@
 #source: ehdr_start-strongref.s
 #ld: -e _start -T ehdr_start-missing.t --no-dynamic-linker
 #error: .*: undefined reference to `__ehdr_start'
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
diff --git a/ld/testsuite/ld-elf/ehdr_start-shared.d b/ld/testsuite/ld-elf/ehdr_start-shared.d
index c17516a..55f9a58 100644
--- a/ld/testsuite/ld-elf/ehdr_start-shared.d
+++ b/ld/testsuite/ld-elf/ehdr_start-shared.d
@@ -1,7 +1,7 @@
 #source: ehdr_start.s
 #ld: -e _start -shared
 #nm: -n
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 #xfail: cris*-*-* frv-*-*
 
 #...
diff --git a/ld/testsuite/ld-elf/ehdr_start-userdef.d b/ld/testsuite/ld-elf/ehdr_start-userdef.d
index b58ae3f..36c6d7e 100644
--- a/ld/testsuite/ld-elf/ehdr_start-userdef.d
+++ b/ld/testsuite/ld-elf/ehdr_start-userdef.d
@@ -1,7 +1,7 @@
 #source: ehdr_start-strongref.s
 #ld: -e _start -T ehdr_start-userdef.t
 #readelf: -Ws
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 #xfail: frv-*-*
 
 #...
diff --git a/ld/testsuite/ld-elf/ehdr_start-weak.d b/ld/testsuite/ld-elf/ehdr_start-weak.d
index d3d5af7..5537b8f 100644
--- a/ld/testsuite/ld-elf/ehdr_start-weak.d
+++ b/ld/testsuite/ld-elf/ehdr_start-weak.d
@@ -1,7 +1,7 @@
 #source: ehdr_start.s
 #ld: -e _start -T ehdr_start-missing.t --no-dynamic-linker
 #nm: -n
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 #xfail: frv-*-*
 
 #failif
diff --git a/ld/testsuite/ld-elf/ehdr_start.d b/ld/testsuite/ld-elf/ehdr_start.d
index 14a85d0..306c6ad 100644
--- a/ld/testsuite/ld-elf/ehdr_start.d
+++ b/ld/testsuite/ld-elf/ehdr_start.d
@@ -1,7 +1,7 @@
 #source: ehdr_start.s
 #ld: -e _start --build-id
 #nm: -n
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 #xfail: frv-*-*
 
 #...
diff --git a/ld/testsuite/ld-elf/exclude3b.d b/ld/testsuite/ld-elf/exclude3b.d
index 553c30b..ac8407d 100644
--- a/ld/testsuite/ld-elf/exclude3b.d
+++ b/ld/testsuite/ld-elf/exclude3b.d
@@ -1,7 +1,7 @@
 #source: exclude3.s
 #ld: --shared
 #readelf: -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/export-class.exp b/ld/testsuite/ld-elf/export-class.exp
index e458918..583cf82 100644
--- a/ld/testsuite/ld-elf/export-class.exp
+++ b/ld/testsuite/ld-elf/export-class.exp
@@ -32,6 +32,7 @@ if { ![is_elf_format] } {
 # Exclude some more targets; feel free to include your favorite one
 # if you like.
 if { ![istarget *-*-linux*]
+     && ![istarget arm*-*-uclinuxfdpiceabi]
      && ![istarget *-*-nacl*]
      && ![istarget *-*-gnu*] } {
     return
diff --git a/ld/testsuite/ld-elf/global1.d b/ld/testsuite/ld-elf/global1.d
index eae7f0d..726525b 100644
--- a/ld/testsuite/ld-elf/global1.d
+++ b/ld/testsuite/ld-elf/global1.d
@@ -1,7 +1,7 @@
 #source: start.s
 #ld: -shared -z global
 #readelf: -d
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  0x0*6ffffffb \(FLAGS_1\) *Flags: GLOBAL
diff --git a/ld/testsuite/ld-elf/hash.d b/ld/testsuite/ld-elf/hash.d
index 473cd4d..d31168c 100644
--- a/ld/testsuite/ld-elf/hash.d
+++ b/ld/testsuite/ld-elf/hash.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -s -D
 #ld: -shared --hash-style=gnu
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #notarget: mips*-*-*
 
 #...
diff --git a/ld/testsuite/ld-elf/header.d b/ld/testsuite/ld-elf/header.d
index be3722d..c4d174a 100644
--- a/ld/testsuite/ld-elf/header.d
+++ b/ld/testsuite/ld-elf/header.d
@@ -1,4 +1,4 @@
-# target: *-*-linux* *-*-gnu* *-*-vxworks
+# target: *-*-linux* *-*-gnu* *-*-vxworks arm*-*-uclinuxfdpiceabi
 # ld: -T header.t -z max-page-size=0x100
 # objdump: -hpw
 
diff --git a/ld/testsuite/ld-elf/loadaddr1.d b/ld/testsuite/ld-elf/loadaddr1.d
index adb562a..c4c5ed8 100644
--- a/ld/testsuite/ld-elf/loadaddr1.d
+++ b/ld/testsuite/ld-elf/loadaddr1.d
@@ -1,7 +1,7 @@
 #source: loadaddr.s
 #ld: -T loadaddr1.t -T loadaddr.t -z max-page-size=0x200000
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD +0x000000 0xf*80000000 0xf*80000000 0x100050 0x100050 RWE 0x200000
diff --git a/ld/testsuite/ld-elf/loadaddr2.d b/ld/testsuite/ld-elf/loadaddr2.d
index eaa672d..577fb6a 100644
--- a/ld/testsuite/ld-elf/loadaddr2.d
+++ b/ld/testsuite/ld-elf/loadaddr2.d
@@ -1,7 +1,7 @@
 #source: loadaddr.s
 #ld: -T loadaddr2.t -T loadaddr.t -z max-page-size=0x200000
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD +0x000000 0xf*80000000 0xf*80000000 0x100050 0x100050 RWE 0x200000
diff --git a/ld/testsuite/ld-elf/loadaddr3a.d b/ld/testsuite/ld-elf/loadaddr3a.d
index 0082e1f..f531f93 100644
--- a/ld/testsuite/ld-elf/loadaddr3a.d
+++ b/ld/testsuite/ld-elf/loadaddr3a.d
@@ -1,7 +1,7 @@
 #source: loadaddr.s
 #ld: -T loadaddr3.t -z max-page-size=0x200000
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD +0x000000 0x0*00000000 0x0*00000000 0x0*0110 0x0*0110 R E 0x.*
diff --git a/ld/testsuite/ld-elf/loadaddr3b.d b/ld/testsuite/ld-elf/loadaddr3b.d
index 63efa71..ac4b517 100644
--- a/ld/testsuite/ld-elf/loadaddr3b.d
+++ b/ld/testsuite/ld-elf/loadaddr3b.d
@@ -1,7 +1,7 @@
 #source: loadaddr.s
 #ld: -T loadaddr3.t -z max-page-size=0x200000
 #objdump: -t
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
 0+0000100 l    d  .text	0+0000000 .text
diff --git a/ld/testsuite/ld-elf/local1.d b/ld/testsuite/ld-elf/local1.d
index 3025d41..be3d24a 100644
--- a/ld/testsuite/ld-elf/local1.d
+++ b/ld/testsuite/ld-elf/local1.d
@@ -1,6 +1,6 @@
 #ld: -shared --version-script local1.map
 #readelf: -s --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
     .*: [0-9a-f]* +[0-9a-f]+ +OBJECT +LOCAL +DEFAULT +[0-9] +foo
diff --git a/ld/testsuite/ld-elf/maxpage1.d b/ld/testsuite/ld-elf/maxpage1.d
index f776257..0b74014 100644
--- a/ld/testsuite/ld-elf/maxpage1.d
+++ b/ld/testsuite/ld-elf/maxpage1.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -z max-page-size=0x200000
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD+.*0x200000
diff --git a/ld/testsuite/ld-elf/maxpage2.d b/ld/testsuite/ld-elf/maxpage2.d
index 7d732eb..95b3dc2 100644
--- a/ld/testsuite/ld-elf/maxpage2.d
+++ b/ld/testsuite/ld-elf/maxpage2.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -z max-page-size=0x100000
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD+.*0x100000
diff --git a/ld/testsuite/ld-elf/maxpage3a.d b/ld/testsuite/ld-elf/maxpage3a.d
index 7d6f2d8..5faddb7 100644
--- a/ld/testsuite/ld-elf/maxpage3a.d
+++ b/ld/testsuite/ld-elf/maxpage3a.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -z max-page-size=0x10000000 -T maxpage3.t
 #readelf: -lS --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] \.data[ \t]+PROGBITS[ \t]+0*10000000[ \t]+[ \t0-9a-f]+WA?.*
diff --git a/ld/testsuite/ld-elf/mbind1a.d b/ld/testsuite/ld-elf/mbind1a.d
index 568b3dc..0e9f900 100644
--- a/ld/testsuite/ld-elf/mbind1a.d
+++ b/ld/testsuite/ld-elf/mbind1a.d
@@ -1,7 +1,7 @@
 #source: mbind1.s
 #ld: -z common-page-size=0x1000 -z max-page-size=0x200000
 #readelf: -S -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] \.mbind\.text[ 	]+PROGBITS[ 	]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AXD  0   0 4096
diff --git a/ld/testsuite/ld-elf/mbind1b.d b/ld/testsuite/ld-elf/mbind1b.d
index 7dae398..49316a1 100644
--- a/ld/testsuite/ld-elf/mbind1b.d
+++ b/ld/testsuite/ld-elf/mbind1b.d
@@ -1,7 +1,7 @@
 #source: mbind1.s
 #ld: -shared -z common-page-size=0x1000 -z max-page-size=0x200000
 #readelf: -S -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] \.mbind\.text[ 	]+PROGBITS[ 	]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AXD  0   0 4096
diff --git a/ld/testsuite/ld-elf/mbind1c.d b/ld/testsuite/ld-elf/mbind1c.d
index 7a1aae8..40cc852 100644
--- a/ld/testsuite/ld-elf/mbind1c.d
+++ b/ld/testsuite/ld-elf/mbind1c.d
@@ -1,7 +1,7 @@
 #source: mbind1.s
 #ld: -pie -z common-page-size=0x1000 -z max-page-size=0x200000
 #readelf: -S -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] \.mbind\.text[ 	]+PROGBITS[ 	]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AXD  0   0 4096
diff --git a/ld/testsuite/ld-elf/multibss1.d b/ld/testsuite/ld-elf/multibss1.d
index 89b94ad..e85c223 100644
--- a/ld/testsuite/ld-elf/multibss1.d
+++ b/ld/testsuite/ld-elf/multibss1.d
@@ -1,7 +1,7 @@
 #source: multibss1.s
 #ld: -e 0
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: hppa64-*-*
 # hppa64 default script add 16 bytes at start of .data giving 0x500010 p_memsz
 
diff --git a/ld/testsuite/ld-elf/noload-2.d b/ld/testsuite/ld-elf/noload-2.d
index c9668a0..d0af8d9 100644
--- a/ld/testsuite/ld-elf/noload-2.d
+++ b/ld/testsuite/ld-elf/noload-2.d
@@ -1,7 +1,7 @@
 #source: noload-1.s
 #ld: -T noload-1.t -z max-page-size=0x200000
 #readelf: -Sl --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  +LOAD +0x.00000 +0x0+ +0x0+ +0x0+.. +0x0+.. +RW +0x200000
diff --git a/ld/testsuite/ld-elf/now-1.d b/ld/testsuite/ld-elf/now-1.d
index 9c7d5fa..bc3ccf8 100644
--- a/ld/testsuite/ld-elf/now-1.d
+++ b/ld/testsuite/ld-elf/now-1.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -shared -z now --enable-new-dtags
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/now-2.d b/ld/testsuite/ld-elf/now-2.d
index 1430bc4..0e33797 100644
--- a/ld/testsuite/ld-elf/now-2.d
+++ b/ld/testsuite/ld-elf/now-2.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -shared -z now --enable-new-dtags
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  0x[0-9a-f]+ +\(FLAGS\) +BIND_NOW
diff --git a/ld/testsuite/ld-elf/now-3.d b/ld/testsuite/ld-elf/now-3.d
index fa98065..b8ff534 100644
--- a/ld/testsuite/ld-elf/now-3.d
+++ b/ld/testsuite/ld-elf/now-3.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -shared -z now --disable-new-dtags
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/now-4.d b/ld/testsuite/ld-elf/now-4.d
index 421063d..f4e9259 100644
--- a/ld/testsuite/ld-elf/now-4.d
+++ b/ld/testsuite/ld-elf/now-4.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -shared -z now --disable-new-dtags
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  0x[0-9a-f]+ +\(BIND_NOW\) +
diff --git a/ld/testsuite/ld-elf/pie.d b/ld/testsuite/ld-elf/pie.d
index d68b962..aa7b855 100644
--- a/ld/testsuite/ld-elf/pie.d
+++ b/ld/testsuite/ld-elf/pie.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -pie
-#target: *-*-linux* *-*-gnu* *-*-solaris*
+#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
 
 #...
  +0x[0-9a-f]+ +\(FLAGS_1\) +Flags: +PIE
diff --git a/ld/testsuite/ld-elf/pr12975.d b/ld/testsuite/ld-elf/pr12975.d
index 9cdc767..6ef92ca 100644
--- a/ld/testsuite/ld-elf/pr12975.d
+++ b/ld/testsuite/ld-elf/pr12975.d
@@ -1,6 +1,6 @@
 #ld: --gc-sections -shared -version-script pr12975.t
 #readelf: -s --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr13177.d b/ld/testsuite/ld-elf/pr13177.d
index 29bd374..f999988 100644
--- a/ld/testsuite/ld-elf/pr13177.d
+++ b/ld/testsuite/ld-elf/pr13177.d
@@ -1,7 +1,7 @@
 #source: pr13177.s
 #ld: --gc-sections -shared
 #readelf: -s -D --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr13195.d b/ld/testsuite/ld-elf/pr13195.d
index 53e41a9..9b7b433 100644
--- a/ld/testsuite/ld-elf/pr13195.d
+++ b/ld/testsuite/ld-elf/pr13195.d
@@ -1,6 +1,6 @@
 #ld: --gc-sections -shared -version-script pr13195.t
 #readelf: -s --wide -D
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr16322.d b/ld/testsuite/ld-elf/pr16322.d
index 348927b..d0e349d 100644
--- a/ld/testsuite/ld-elf/pr16322.d
+++ b/ld/testsuite/ld-elf/pr16322.d
@@ -1,6 +1,6 @@
 #ld: -shared -z relro -z noseparate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #...
   GNU_RELRO .*
diff --git a/ld/testsuite/ld-elf/pr16498a.d b/ld/testsuite/ld-elf/pr16498a.d
index 436bf97..7726d3b 100644
--- a/ld/testsuite/ld-elf/pr16498a.d
+++ b/ld/testsuite/ld-elf/pr16498a.d
@@ -1,6 +1,6 @@
 #ld: -shared -T pr16498a.t
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #...
   TLS .*
diff --git a/ld/testsuite/ld-elf/pr16498b.d b/ld/testsuite/ld-elf/pr16498b.d
index c70c239..e599d90 100644
--- a/ld/testsuite/ld-elf/pr16498b.d
+++ b/ld/testsuite/ld-elf/pr16498b.d
@@ -1,7 +1,7 @@
 #source: pr16498a.s
 #ld: -shared -T pr16498b.t
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #...
   TLS .*
diff --git a/ld/testsuite/ld-elf/pr17615.d b/ld/testsuite/ld-elf/pr17615.d
index dbacbf0..b8e5e2a 100644
--- a/ld/testsuite/ld-elf/pr17615.d
+++ b/ld/testsuite/ld-elf/pr17615.d
@@ -1,6 +1,6 @@
 #ld: --gc-sections -shared
 #readelf: -S --wide --dyn-syms
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr19162.d b/ld/testsuite/ld-elf/pr19162.d
index 5d5c1f7..feca3d4 100644
--- a/ld/testsuite/ld-elf/pr19162.d
+++ b/ld/testsuite/ld-elf/pr19162.d
@@ -2,7 +2,7 @@
 #source: pr19162b.s
 #ld: -shared -z max-page-size=0x200000 -z noseparate-code
 #readelf: -l --wide
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 #notarget: arc*-*-* hppa*-*-*
 # arc target has an extra 64K stack section.
 # hppa fails due to PR 12376.
diff --git a/ld/testsuite/ld-elf/pr19539.d b/ld/testsuite/ld-elf/pr19539.d
index af77515..285d189 100644
--- a/ld/testsuite/ld-elf/pr19539.d
+++ b/ld/testsuite/ld-elf/pr19539.d
@@ -2,7 +2,7 @@
 #source: pr19539.s
 #ld: -pie -T pr19539.t
 #readelf : --dyn-syms --wide
-#target: *-*-linux* *-*-gnu* *-*-solaris*
+#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
 #notarget: cris*-*-* alpha-*-*
 
 Symbol table '\.dynsym' contains [0-9]+ entr(y|ies):
diff --git a/ld/testsuite/ld-elf/pr19617a.d b/ld/testsuite/ld-elf/pr19617a.d
index a565e29..c315f3d 100644
--- a/ld/testsuite/ld-elf/pr19617a.d
+++ b/ld/testsuite/ld-elf/pr19617a.d
@@ -1,7 +1,7 @@
 #source: pr19617.s
 #ld: -E --no-dynamic-linker --hash-style=sysv
 #readelf : --dyn-syms --wide
-#target: *-*-linux* *-*-gnu* *-*-solaris*
+#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
 
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
diff --git a/ld/testsuite/ld-elf/pr19617b.d b/ld/testsuite/ld-elf/pr19617b.d
index 4d1886f..5905423 100644
--- a/ld/testsuite/ld-elf/pr19617b.d
+++ b/ld/testsuite/ld-elf/pr19617b.d
@@ -1,7 +1,7 @@
 #source: pr19617.s
 #ld: --dynamic-list-data --no-dynamic-linker
 #readelf : --dyn-syms --wide
-#target: *-*-linux* *-*-gnu* *-*-solaris*
+#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
 
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
diff --git a/ld/testsuite/ld-elf/pr19617c.d b/ld/testsuite/ld-elf/pr19617c.d
index 9ac8fc1..c9cca48 100644
--- a/ld/testsuite/ld-elf/pr19617c.d
+++ b/ld/testsuite/ld-elf/pr19617c.d
@@ -1,7 +1,7 @@
 #source: pr19617.s
 #ld: --dynamic-list-data --no-dynamic-linker
 #readelf : --dyn-syms --wide
-#target: *-*-linux* *-*-gnu* *-*-solaris*
+#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr19698.d b/ld/testsuite/ld-elf/pr19698.d
index a39f67a..a82677c 100644
--- a/ld/testsuite/ld-elf/pr19698.d
+++ b/ld/testsuite/ld-elf/pr19698.d
@@ -1,6 +1,6 @@
 #ld: -shared $srcdir/$subdir/pr19698.t
 #readelf : --dyn-syms --wide
-#target: *-*-linux* *-*-gnu* *-*-solaris*
+#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
 
 Symbol table '\.dynsym' contains [0-9]+ entries:
 #...
diff --git a/ld/testsuite/ld-elf/pr19789.d b/ld/testsuite/ld-elf/pr19789.d
index e7cc6c5..99b9338 100644
--- a/ld/testsuite/ld-elf/pr19789.d
+++ b/ld/testsuite/ld-elf/pr19789.d
@@ -1,6 +1,6 @@
 #ld: -r -E
 #readelf: -s --wide
-#target: *-*-linux* *-*-gnu* *-*-solaris*
+#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
 
 Symbol table '\.symtab' contains [0-9]+ entries:
 #...
diff --git a/ld/testsuite/ld-elf/pr20513c.d b/ld/testsuite/ld-elf/pr20513c.d
index ab9b360..af81161 100644
--- a/ld/testsuite/ld-elf/pr20513c.d
+++ b/ld/testsuite/ld-elf/pr20513c.d
@@ -2,7 +2,7 @@
 #source: pr20513b.s
 #ld: -shared
 #readelf: -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr20513d.d b/ld/testsuite/ld-elf/pr20513d.d
index d1700a7..f1a455c 100644
--- a/ld/testsuite/ld-elf/pr20513d.d
+++ b/ld/testsuite/ld-elf/pr20513d.d
@@ -2,7 +2,7 @@
 #source: pr20513a.s
 #ld: -shared
 #readelf: -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr21384.d b/ld/testsuite/ld-elf/pr21384.d
index 5f17aaf..343d0af 100644
--- a/ld/testsuite/ld-elf/pr21384.d
+++ b/ld/testsuite/ld-elf/pr21384.d
@@ -1,6 +1,6 @@
 #ld: -T pr21384.ld --dynamic-list $srcdir/$subdir/pr21384.dl --no-dynamic-linker
 #readelf : --dyn-syms --wide
-#target: *-*-linux* *-*-gnu* *-*-solaris*
+#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
 
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
diff --git a/ld/testsuite/ld-elf/pr21389a.d b/ld/testsuite/ld-elf/pr21389a.d
index 2dcd175..da50d8a 100644
--- a/ld/testsuite/ld-elf/pr21389a.d
+++ b/ld/testsuite/ld-elf/pr21389a.d
@@ -1,7 +1,7 @@
 #source: pr21389.s
 #ld: -shared --version-script pr21389.map -soname=pr21389.so
 #objdump: -p
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
 Version definitions:
diff --git a/ld/testsuite/ld-elf/pr21389b.d b/ld/testsuite/ld-elf/pr21389b.d
index 8dbc34b..fe39e9c 100644
--- a/ld/testsuite/ld-elf/pr21389b.d
+++ b/ld/testsuite/ld-elf/pr21389b.d
@@ -1,7 +1,7 @@
 #source: pr21389.s
 #ld: -shared --version-script pr21389.map -soname=pr21389.so
 #readelf: -d
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  0x[0-9a-f]* \(SONAME\) +Library soname: \[pr21389.so\]
diff --git a/ld/testsuite/ld-elf/pr21389c.d b/ld/testsuite/ld-elf/pr21389c.d
index 76ac37b..31759f1 100644
--- a/ld/testsuite/ld-elf/pr21389c.d
+++ b/ld/testsuite/ld-elf/pr21389c.d
@@ -1,7 +1,7 @@
 #source: pr21389.s
 #ld: -shared -soname=pr21389.so
 #readelf: -d
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  0x[0-9a-f]* \(SONAME\) +Library soname: \[pr21389.so\]
diff --git a/ld/testsuite/ld-elf/pr21562a.d b/ld/testsuite/ld-elf/pr21562a.d
index 9fe6daa..1d17d5d 100644
--- a/ld/testsuite/ld-elf/pr21562a.d
+++ b/ld/testsuite/ld-elf/pr21562a.d
@@ -1,6 +1,6 @@
 #ld: -shared -z defs --gc-sections
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562b.d b/ld/testsuite/ld-elf/pr21562b.d
index 72d4644..d4b7e79 100644
--- a/ld/testsuite/ld-elf/pr21562b.d
+++ b/ld/testsuite/ld-elf/pr21562b.d
@@ -1,6 +1,6 @@
 #ld: -shared -z defs --gc-sections
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562c.d b/ld/testsuite/ld-elf/pr21562c.d
index 2ef8378..4cc7c22 100644
--- a/ld/testsuite/ld-elf/pr21562c.d
+++ b/ld/testsuite/ld-elf/pr21562c.d
@@ -1,7 +1,7 @@
 #source: pr21562a.s
 #ld: -shared -z defs --gc-sections -T pr21562a.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562d.d b/ld/testsuite/ld-elf/pr21562d.d
index 47a8fce..3dabcf4 100644
--- a/ld/testsuite/ld-elf/pr21562d.d
+++ b/ld/testsuite/ld-elf/pr21562d.d
@@ -1,7 +1,7 @@
 #source: pr21562b.s
 #ld: -shared -z defs --gc-sections -T pr21562a.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562e.d b/ld/testsuite/ld-elf/pr21562e.d
index ee969bd..efe1c5a 100644
--- a/ld/testsuite/ld-elf/pr21562e.d
+++ b/ld/testsuite/ld-elf/pr21562e.d
@@ -1,7 +1,7 @@
 #source: pr21562a.s
 #ld: -shared -z defs
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
diff --git a/ld/testsuite/ld-elf/pr21562f.d b/ld/testsuite/ld-elf/pr21562f.d
index 119f43e..077c84e 100644
--- a/ld/testsuite/ld-elf/pr21562f.d
+++ b/ld/testsuite/ld-elf/pr21562f.d
@@ -1,7 +1,7 @@
 #source: pr21562b.s
 #ld: -shared -z defs
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
diff --git a/ld/testsuite/ld-elf/pr21562g.d b/ld/testsuite/ld-elf/pr21562g.d
index f3d2a31..4f2c800 100644
--- a/ld/testsuite/ld-elf/pr21562g.d
+++ b/ld/testsuite/ld-elf/pr21562g.d
@@ -1,7 +1,7 @@
 #source: pr21562a.s
 #ld: -shared -z defs -T pr21562a.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
diff --git a/ld/testsuite/ld-elf/pr21562h.d b/ld/testsuite/ld-elf/pr21562h.d
index 0517aec..d500013 100644
--- a/ld/testsuite/ld-elf/pr21562h.d
+++ b/ld/testsuite/ld-elf/pr21562h.d
@@ -1,7 +1,7 @@
 #source: pr21562b.s
 #ld: -shared -z defs -T pr21562a.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
diff --git a/ld/testsuite/ld-elf/pr21562i.d b/ld/testsuite/ld-elf/pr21562i.d
index 3ce3bf1..5779d51 100644
--- a/ld/testsuite/ld-elf/pr21562i.d
+++ b/ld/testsuite/ld-elf/pr21562i.d
@@ -1,7 +1,7 @@
 #source: pr21562a.s
 #ld: -shared -z defs --gc-sections -T pr21562b.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562j.d b/ld/testsuite/ld-elf/pr21562j.d
index 415c845..583b688 100644
--- a/ld/testsuite/ld-elf/pr21562j.d
+++ b/ld/testsuite/ld-elf/pr21562j.d
@@ -1,7 +1,7 @@
 #source: pr21562b.s
 #ld: -shared -z defs --gc-sections -T pr21562b.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562k.d b/ld/testsuite/ld-elf/pr21562k.d
index 68e6e3c..8202559 100644
--- a/ld/testsuite/ld-elf/pr21562k.d
+++ b/ld/testsuite/ld-elf/pr21562k.d
@@ -1,7 +1,7 @@
 #source: pr21562a.s
 #ld: -shared -z defs --gc-sections -T pr21562c.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562l.d b/ld/testsuite/ld-elf/pr21562l.d
index 4c408a2..262096e 100644
--- a/ld/testsuite/ld-elf/pr21562l.d
+++ b/ld/testsuite/ld-elf/pr21562l.d
@@ -1,7 +1,7 @@
 #source: pr21562b.s
 #ld: -shared -z defs --gc-sections -T pr21562c.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562m.d b/ld/testsuite/ld-elf/pr21562m.d
index 4d1b390..e86ae6f 100644
--- a/ld/testsuite/ld-elf/pr21562m.d
+++ b/ld/testsuite/ld-elf/pr21562m.d
@@ -1,7 +1,7 @@
 #source: pr21562a.s
 #ld: -shared -z defs --gc-sections -T pr21562d.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21562n.d b/ld/testsuite/ld-elf/pr21562n.d
index d31e1f3..977e0c0 100644
--- a/ld/testsuite/ld-elf/pr21562n.d
+++ b/ld/testsuite/ld-elf/pr21562n.d
@@ -1,7 +1,7 @@
 #source: pr21562b.s
 #ld: -shared -z defs --gc-sections -T pr21562d.t
 #readelf: -s -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #xfail: hppa64-*-* i370-*-* i860-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr21903a.d b/ld/testsuite/ld-elf/pr21903a.d
index 020c561..a688df5 100644
--- a/ld/testsuite/ld-elf/pr21903a.d
+++ b/ld/testsuite/ld-elf/pr21903a.d
@@ -1,7 +1,7 @@
 #source: pr21903.s
 #ld: -shared --no-define-common
 #readelf: --dyn-syms
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
 .*: 0+0 +0 +OBJECT +GLOBAL +DEFAULT +UND foo
diff --git a/ld/testsuite/ld-elf/pr21903b.d b/ld/testsuite/ld-elf/pr21903b.d
index decd4f3..52893c3 100644
--- a/ld/testsuite/ld-elf/pr21903b.d
+++ b/ld/testsuite/ld-elf/pr21903b.d
@@ -1,7 +1,7 @@
 #source: pr21903.s
 #ld: -shared
 #readelf: --dyn-syms
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
 .*: [0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ foo
diff --git a/ld/testsuite/ld-elf/pr21903d.d b/ld/testsuite/ld-elf/pr21903d.d
index ec72900..2e3088e 100644
--- a/ld/testsuite/ld-elf/pr21903d.d
+++ b/ld/testsuite/ld-elf/pr21903d.d
@@ -1,4 +1,4 @@
 #source: pr21903.s
 #ld: --no-define-common -pie
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #error: --no-define-common may not be used without -shared
diff --git a/ld/testsuite/ld-elf/pr22269a.d b/ld/testsuite/ld-elf/pr22269a.d
index d993d19..2b3c94c 100644
--- a/ld/testsuite/ld-elf/pr22269a.d
+++ b/ld/testsuite/ld-elf/pr22269a.d
@@ -2,7 +2,7 @@
 #source: pr22269.s
 #ld: -pie --no-dynamic-linker
 #readelf: -r -x .data.rel.ro
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 There are no relocations in this file.
 
diff --git a/ld/testsuite/ld-elf/pr22269b.d b/ld/testsuite/ld-elf/pr22269b.d
index df14d05..bbfadc9 100644
--- a/ld/testsuite/ld-elf/pr22269b.d
+++ b/ld/testsuite/ld-elf/pr22269b.d
@@ -3,7 +3,7 @@
 #ld: -pie --no-dynamic-linker -z dynamic-undefined-weak
 #readelf: -r -x .data.rel.ro
 #warning: -z dynamic-undefined-weak ignored
-#target: *-*-linux* *-*-gnu* *-*-nacl*
+#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 There are no relocations in this file.
 
diff --git a/ld/testsuite/ld-elf/pr22393-1a.d b/ld/testsuite/ld-elf/pr22393-1a.d
index f8dc0cc..57f254b 100644
--- a/ld/testsuite/ld-elf/pr22393-1a.d
+++ b/ld/testsuite/ld-elf/pr22393-1a.d
@@ -1,7 +1,7 @@
 #source: pr22393-1.s
 #ld: -shared -z separate-code -z relro
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr22393-1b.d b/ld/testsuite/ld-elf/pr22393-1b.d
index 089d779..c7e5871 100644
--- a/ld/testsuite/ld-elf/pr22393-1b.d
+++ b/ld/testsuite/ld-elf/pr22393-1b.d
@@ -1,7 +1,7 @@
 #source: pr22393-1.s
 #ld: -shared -z relro -z separate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr22393-1c.d b/ld/testsuite/ld-elf/pr22393-1c.d
index 3476be3..aea5890 100644
--- a/ld/testsuite/ld-elf/pr22393-1c.d
+++ b/ld/testsuite/ld-elf/pr22393-1c.d
@@ -1,7 +1,7 @@
 #source: pr22393-1.s
 #ld: -pie -z separate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr22393-1d.d b/ld/testsuite/ld-elf/pr22393-1d.d
index c0d1051..e74dc10 100644
--- a/ld/testsuite/ld-elf/pr22393-1d.d
+++ b/ld/testsuite/ld-elf/pr22393-1d.d
@@ -1,7 +1,7 @@
 #source: pr22393-1.s
 #ld: -pie -z separate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr22393-1e.d b/ld/testsuite/ld-elf/pr22393-1e.d
index 673d3f7..cef1a4c 100644
--- a/ld/testsuite/ld-elf/pr22393-1e.d
+++ b/ld/testsuite/ld-elf/pr22393-1e.d
@@ -1,7 +1,7 @@
 #source: pr22393-1.s
 #ld: -z separate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr22393-1f.d b/ld/testsuite/ld-elf/pr22393-1f.d
index 4c5de43..9724e0e 100644
--- a/ld/testsuite/ld-elf/pr22393-1f.d
+++ b/ld/testsuite/ld-elf/pr22393-1f.d
@@ -1,7 +1,7 @@
 #source: pr22393-1.s
 #ld: -z separate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/pr22423.d b/ld/testsuite/ld-elf/pr22423.d
index 7376302..70bd59e 100644
--- a/ld/testsuite/ld-elf/pr22423.d
+++ b/ld/testsuite/ld-elf/pr22423.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -l -W
 #ld: -pie
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  +PHDR +0x[0-9a-f]+ +0x[0-9a-f]+ +0x[0-9a-f]+ +0x[0-9a-f]+ +0x[0-9a-f]+ +R +0x[48]?
diff --git a/ld/testsuite/ld-elf/rpath-1.d b/ld/testsuite/ld-elf/rpath-1.d
index 38d6eab..61da219 100644
--- a/ld/testsuite/ld-elf/rpath-1.d
+++ b/ld/testsuite/ld-elf/rpath-1.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -shared -rpath=. --disable-new-dtags
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/rpath-2.d b/ld/testsuite/ld-elf/rpath-2.d
index d4c75ff..8bb19f8 100644
--- a/ld/testsuite/ld-elf/rpath-2.d
+++ b/ld/testsuite/ld-elf/rpath-2.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -shared -rpath=. --disable-new-dtags
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  +0x[0-9a-f]+ +\(RPATH\) +Library rpath: +\[.\]
diff --git a/ld/testsuite/ld-elf/runpath-1.d b/ld/testsuite/ld-elf/runpath-1.d
index 4d06639..72667e8 100644
--- a/ld/testsuite/ld-elf/runpath-1.d
+++ b/ld/testsuite/ld-elf/runpath-1.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -shared -rpath . --enable-new-dtags
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/runpath-2.d b/ld/testsuite/ld-elf/runpath-2.d
index 0df8af6..97a9532 100644
--- a/ld/testsuite/ld-elf/runpath-2.d
+++ b/ld/testsuite/ld-elf/runpath-2.d
@@ -1,7 +1,7 @@
 #source: start.s
 #readelf: -d -W
 #ld: -shared -rpath . --enable-new-dtags
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
  +0x[0-9a-f]+ +\(RUNPATH\) +Library runpath: +\[.\]
diff --git a/ld/testsuite/ld-elf/seg.d b/ld/testsuite/ld-elf/seg.d
index 2255195..3ff7aba 100644
--- a/ld/testsuite/ld-elf/seg.d
+++ b/ld/testsuite/ld-elf/seg.d
@@ -1,4 +1,4 @@
-#target: *-*-linux* *-*-gnu* *-*-vxworks
+#target: *-*-linux* *-*-gnu* *-*-vxworks arm*-*-uclinuxfdpiceabi
 #source: seg.s
 #ld: -T seg.t -z max-page-size=0x1000
 #readelf: -l --wide
diff --git a/ld/testsuite/ld-elf/sizeofb.d b/ld/testsuite/ld-elf/sizeofb.d
index c7d4edd..31cafa6 100644
--- a/ld/testsuite/ld-elf/sizeofb.d
+++ b/ld/testsuite/ld-elf/sizeofb.d
@@ -1,7 +1,7 @@
 #source: sizeof.s
 #ld: -shared
 #readelf: -sW
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
diff --git a/ld/testsuite/ld-elf/startofb.d b/ld/testsuite/ld-elf/startofb.d
index b0cf563..0320328 100644
--- a/ld/testsuite/ld-elf/startofb.d
+++ b/ld/testsuite/ld-elf/startofb.d
@@ -1,7 +1,7 @@
 #source: startof.s
 #ld: -shared
 #readelf: -sW
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
diff --git a/ld/testsuite/ld-elf/strtab.d b/ld/testsuite/ld-elf/strtab.d
index c1e9096..bf346d6 100644
--- a/ld/testsuite/ld-elf/strtab.d
+++ b/ld/testsuite/ld-elf/strtab.d
@@ -1,6 +1,6 @@
 #ld: -shared
 #readelf: -W -x .strtab
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #failif
 #...
diff --git a/ld/testsuite/ld-elf/textaddr1.d b/ld/testsuite/ld-elf/textaddr1.d
index 19c7d8e..f004ea7 100644
--- a/ld/testsuite/ld-elf/textaddr1.d
+++ b/ld/testsuite/ld-elf/textaddr1.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -Ttext-segment 0x7000000 -z max-page-size=0x200000 -z noseparate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu*
+#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD +0x0+ 0x0*7000000 0x0*7000000 0x0*[0-9a-f][0-9a-f][0-9a-f] 0x0*[0-9a-f][0-9a-f][0-9a-f] R E 0x200000
diff --git a/ld/testsuite/ld-elf/textaddr2.d b/ld/testsuite/ld-elf/textaddr2.d
index 50224c8..73d88b0 100644
--- a/ld/testsuite/ld-elf/textaddr2.d
+++ b/ld/testsuite/ld-elf/textaddr2.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -shared -Ttext-segment 0x7000000 -z max-page-size=0x200000 -z noseparate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu*
+#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD +0x0+ 0x0*7000000 0x0*7000000 0x0*[0-9a-f]+ 0x0*[0-9a-f]+ R[ W]E 0x200000
diff --git a/ld/testsuite/ld-elf/textaddr3.d b/ld/testsuite/ld-elf/textaddr3.d
index 29ed498..3796b7d 100644
--- a/ld/testsuite/ld-elf/textaddr3.d
+++ b/ld/testsuite/ld-elf/textaddr3.d
@@ -1,4 +1,4 @@
 #source: maxpage1.s
 #ld: -Ttext-segment 0x10000 -z max-page-size=0x200000
-#target: *-*-linux-gnu *-*-gnu*
+#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
 #warning: .*address of `text-segment' isn't multiple of maximum page size
diff --git a/ld/testsuite/ld-elf/textaddr4.d b/ld/testsuite/ld-elf/textaddr4.d
index d596e40..746ec46 100644
--- a/ld/testsuite/ld-elf/textaddr4.d
+++ b/ld/testsuite/ld-elf/textaddr4.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -z max-page-size=0x10000 -Ttext-segment 0x10000 -z noseparate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu*
+#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD +0x0+ 0x0*10000 0x0*10000 0x0*[0-9a-f][0-9a-f][0-9a-f] 0x0*[0-9a-f][0-9a-f][0-9a-f] R E 0x10000
diff --git a/ld/testsuite/ld-elf/textaddr5.d b/ld/testsuite/ld-elf/textaddr5.d
index 41d00c5..3ce8d1d 100644
--- a/ld/testsuite/ld-elf/textaddr5.d
+++ b/ld/testsuite/ld-elf/textaddr5.d
@@ -1,4 +1,4 @@
 #source: maxpage1.s
 #ld: -shared -z max-page-size=0x200000 -Ttext-segment 0x10000
-#target: *-*-linux-gnu *-*-gnu*
+#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
 #warning: .*address of `text-segment' isn't multiple of maximum page size
diff --git a/ld/testsuite/ld-elf/textaddr6.d b/ld/testsuite/ld-elf/textaddr6.d
index 8015dcb..aa5cf56 100644
--- a/ld/testsuite/ld-elf/textaddr6.d
+++ b/ld/testsuite/ld-elf/textaddr6.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -shared -z max-page-size=0x10000 -Ttext-segment 0x10000 -z noseparate-code
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu*
+#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD +0x0+ 0x0*10000 0x0*10000 0x0*[0-9a-f]+ 0x0*[0-9a-f]+ R[ W]E 0x10000
diff --git a/ld/testsuite/ld-elf/textaddr7.d b/ld/testsuite/ld-elf/textaddr7.d
index b4237db..89fcee6 100644
--- a/ld/testsuite/ld-elf/textaddr7.d
+++ b/ld/testsuite/ld-elf/textaddr7.d
@@ -1,7 +1,7 @@
 #source: maxpage1.s
 #ld: -n -z max-page-size=0x200000 -Ttext-segment 0x10000
 #readelf: -l --wide
-#target: *-*-linux-gnu *-*-gnu*
+#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   LOAD .*
diff --git a/ld/testsuite/ld-elf/tls.exp b/ld/testsuite/ld-elf/tls.exp
index de5a86b..0ec39a0 100644
--- a/ld/testsuite/ld-elf/tls.exp
+++ b/ld/testsuite/ld-elf/tls.exp
@@ -22,6 +22,7 @@
 # Make sure that binutils can correctly handle TLS.
 
 if { ![istarget *-*-linux*]
+     && ![istarget arm*-*-uclinuxfdpiceabi]
      && ![istarget *-*-nacl*]
      && ![istarget *-*-gnu*] } {
     return
diff --git a/ld/testsuite/ld-elf/tls_common.exp b/ld/testsuite/ld-elf/tls_common.exp
index ce3ec90..d572afc 100644
--- a/ld/testsuite/ld-elf/tls_common.exp
+++ b/ld/testsuite/ld-elf/tls_common.exp
@@ -24,6 +24,7 @@
 # Make sure that binutils can correctly handle ld output in ELF.
 
 if { ![istarget *-*-linux*]
+     && ![istarget arm*-*-uclinuxfdpiceabi]
      && ![istarget *-*-nacl*]
      && ![istarget *-*-gnu*] } {
     return
diff --git a/ld/testsuite/ld-elf/unknown2.d b/ld/testsuite/ld-elf/unknown2.d
index 8d6cdee..2e92a5a 100644
--- a/ld/testsuite/ld-elf/unknown2.d
+++ b/ld/testsuite/ld-elf/unknown2.d
@@ -1,7 +1,7 @@
 #source: unknown2.s
 #ld: -shared
 #readelf: -S
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
   \[[ 0-9]+\] \.note.foo[ \t]+NOTE[ \t]+.*
diff --git a/ld/testsuite/ld-gc/abi-note.d b/ld/testsuite/ld-gc/abi-note.d
index d796ccc..0d6d814 100644
--- a/ld/testsuite/ld-gc/abi-note.d
+++ b/ld/testsuite/ld-gc/abi-note.d
@@ -1,7 +1,7 @@
 #name: --gc-sections with note section
 #ld: --gc-sections -e _start
 #readelf: -S --wide
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #notarget: *-*-*aout *-*-*oldld
 
 #...
diff --git a/ld/testsuite/ld-gc/pr11218.d b/ld/testsuite/ld-gc/pr11218.d
index fc26940..349f9c5 100644
--- a/ld/testsuite/ld-gc/pr11218.d
+++ b/ld/testsuite/ld-gc/pr11218.d
@@ -1,5 +1,5 @@
 # name: --gc-sections with shared library
 # source: dummy.s
 # ld: --gc-sections -e main tmpdir/pr11218-2.o tmpdir/pr11218-1.so
-# target: *-*-linux* *-*-gnu*
+# target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 # error: undefined reference to `unresolved_detected_at_runtime_not_at_linktime'
diff --git a/ld/testsuite/ld-gc/pr19167.d b/ld/testsuite/ld-gc/pr19167.d
index b8e37be..e075c75 100644
--- a/ld/testsuite/ld-gc/pr19167.d
+++ b/ld/testsuite/ld-gc/pr19167.d
@@ -2,7 +2,7 @@
 #source: pr19167b.s
 #ld: --gc-sections -e _start
 #objdump: -s -j _foo
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
 
 #...
diff --git a/ld/testsuite/ld-gc/pr20022.d b/ld/testsuite/ld-gc/pr20022.d
index 40473c2..0ba50d2 100644
--- a/ld/testsuite/ld-gc/pr20022.d
+++ b/ld/testsuite/ld-gc/pr20022.d
@@ -1,7 +1,7 @@
 #source: pr20022b.s
 #ld: --gc-sections -e _start tmpdir/pr20022.so
 #readelf: -SsW
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
 #notarget: mips*-*-*
 # Skip on targets without dynamic relocations in .text section.
diff --git a/ld/testsuite/ld-gc/start.d b/ld/testsuite/ld-gc/start.d
index 18e74c1..0145c0d 100644
--- a/ld/testsuite/ld-gc/start.d
+++ b/ld/testsuite/ld-gc/start.d
@@ -1,7 +1,7 @@
 #name: --gc-sections with __start_
 #ld: --gc-sections -e _start
 #nm: -n
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
 
 #...
diff --git a/ld/testsuite/ld-gc/stop.d b/ld/testsuite/ld-gc/stop.d
index f8a32d6..a0b8ee7 100644
--- a/ld/testsuite/ld-gc/stop.d
+++ b/ld/testsuite/ld-gc/stop.d
@@ -1,7 +1,7 @@
 #name: --gc-sections removing __stop_
 #ld: --gc-sections -e _start
 #nm: -n
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 #notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
 
 #failif
diff --git a/ld/testsuite/ld-scripts/phdrs2.exp b/ld/testsuite/ld-scripts/phdrs2.exp
index a4d1ff4..91addae 100644
--- a/ld/testsuite/ld-scripts/phdrs2.exp
+++ b/ld/testsuite/ld-scripts/phdrs2.exp
@@ -25,6 +25,7 @@ if {    ![istarget *-*-sysv4*] \
      && ![istarget *-*-eabi*] \
      && ![istarget hppa*64*-*-hpux*] \
      && ![istarget *-*-linux*] \
+     && ![istarget arm*-*-uclinuxfdpiceabi] \
      && ![istarget *-*-gnu*] \
      && ![istarget *-*-irix5*] \
      && ![istarget *-*-irix6*] \
diff --git a/ld/testsuite/ld-scripts/rgn-at5.d b/ld/testsuite/ld-scripts/rgn-at5.d
index 012451a..767285c 100644
--- a/ld/testsuite/ld-scripts/rgn-at5.d
+++ b/ld/testsuite/ld-scripts/rgn-at5.d
@@ -2,7 +2,7 @@
 # source: rgn-at5.s
 # ld: -T rgn-at5.t -z max-page-size=0x1000
 # objdump: -w -h
-# target: *-*-linux* *-*-gnu*
+# target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 # xfail: rx-*-*
 #   FAILS on the RX because the linker has to set LMA == VMA for the
 #   Renesas loader.
diff --git a/ld/testsuite/ld-undefined/entry-3.d b/ld/testsuite/ld-undefined/entry-3.d
index ca91765..474a6d9 100644
--- a/ld/testsuite/ld-undefined/entry-3.d
+++ b/ld/testsuite/ld-undefined/entry-3.d
@@ -2,7 +2,7 @@
 #source: dummy.s
 #ld: -shared --entry foo tmpdir/libentry.a
 #nm: -n
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
 [0-9a-f]+ T +foo
diff --git a/ld/testsuite/ld-undefined/entry-4.d b/ld/testsuite/ld-undefined/entry-4.d
index d02808e..fa390a4 100644
--- a/ld/testsuite/ld-undefined/entry-4.d
+++ b/ld/testsuite/ld-undefined/entry-4.d
@@ -2,7 +2,7 @@
 #source: dummy.s
 #ld: -shared --entry foo -u foo tmpdir/libentry.a
 #nm: -n
-#target: *-*-linux* *-*-gnu*
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
 
 #...
 [0-9a-f]+ T +foo
Christophe Lyon April 25, 2018, 2:14 p.m. UTC | #10
On 19 April 2018 at 09:01, Christophe Lyon <christophe.lyon@st.com> wrote:
> On 05/04/2018 14:45, Christophe Lyon wrote:

>>

>> On 5 April 2018 at 10:07, Nick Clifton <nickc@redhat.com> wrote:

>>>

>>> Hi Christophe,

>>>

>>>    Thanks for the revised patch set.  I have run them through their

>>>    paces and everything seems fine now, so please go ahead and commit.

>>>

>>> Cheers

>>>    Nick

>>>

>>>

>> Hi Nick,

>>

>> Thanks, this is great news!

>>

>> What about Joseph's request to use another target name (such as

>> arm-uclinuxfdpiceabi)?

>>

>> Do you want me to change it? If so, I guess I can either:

>> - commit the patches I posted, and commit the target change later

>> - update the patches, commit the updated version and post it here for

>> reference

>>

>> Do you have a preference or another suggestion?

>

>

> I have posted an updated version of patch #1, such that is uses

> arm-uclinuxfdpiceabi as target name.

>

> Here is an additional testsuite-only patch, such that as many tests pass as

> with the previous target name.

> Is this too invasive?

>


Ping ?


> Thanks,

>

> Christophe

>

>> Thanks,

>>

>> Christophe

>> .

>>

>
Nick Clifton April 25, 2018, 2:50 p.m. UTC | #11
Hi Christophe,

>> Here is an additional testsuite-only patch, such that as many tests pass as

>> with the previous target name.

>> Is this too invasive?

>>

> 

> Ping ?


Doh - sorry - really not keeping up to date with these patches...

Anyway, patch approved, please go ahead and apply.

Cheers
  Nick