[PATCHv5,1/3] gdb/features: set osabi in all Linux related features/*.xml files

Message ID 5ae0586f15def7f48516494b3529824cc552b839.1730059609.git.aburgess@redhat.com
State New
Headers
Series Returning osabi from gdbserer in more cases |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Andrew Burgess Oct. 27, 2024, 8:07 p.m. UTC
  Some of the top level (i.e. those that contain the <target> element)
xml files in gdb/features/ are clearly Linux only.  I conclude this
based on the files names containing the string "linux".

I think that all of these files should have the <osabi> element
included with the value "GNU/Linux".

This commits adds the <osabi> element where I believe it is
appropriate and regenerates the associated .c files.

The benefit of this change is that gdbserver, which makes use of these
files, will now send the osabi back in more cases.  Sending back more
descriptive target descriptions is a good thing as this makes it
easier for GDB to select the correct gdbarch.
---
 gdb/features/mips64-dsp-linux.c     | 2 ++
 gdb/features/mips64-dsp-linux.xml   | 1 +
 gdb/features/mips64-linux.c         | 2 ++
 gdb/features/mips64-linux.xml       | 1 +
 gdb/features/s390-gs-linux64.c      | 2 ++
 gdb/features/s390-gs-linux64.xml    | 1 +
 gdb/features/s390-linux32.c         | 2 ++
 gdb/features/s390-linux32.xml       | 1 +
 gdb/features/s390-linux32v1.c       | 2 ++
 gdb/features/s390-linux32v1.xml     | 1 +
 gdb/features/s390-linux32v2.c       | 2 ++
 gdb/features/s390-linux32v2.xml     | 1 +
 gdb/features/s390-linux64.c         | 2 ++
 gdb/features/s390-linux64.xml       | 1 +
 gdb/features/s390-linux64v1.c       | 2 ++
 gdb/features/s390-linux64v1.xml     | 1 +
 gdb/features/s390-linux64v2.c       | 2 ++
 gdb/features/s390-linux64v2.xml     | 1 +
 gdb/features/s390-te-linux64.c      | 2 ++
 gdb/features/s390-te-linux64.xml    | 1 +
 gdb/features/s390-tevx-linux64.c    | 2 ++
 gdb/features/s390-tevx-linux64.xml  | 1 +
 gdb/features/s390-vx-linux64.c      | 2 ++
 gdb/features/s390-vx-linux64.xml    | 1 +
 gdb/features/s390x-gs-linux64.c     | 2 ++
 gdb/features/s390x-gs-linux64.xml   | 1 +
 gdb/features/s390x-linux64.c        | 2 ++
 gdb/features/s390x-linux64.xml      | 1 +
 gdb/features/s390x-linux64v1.c      | 2 ++
 gdb/features/s390x-linux64v1.xml    | 1 +
 gdb/features/s390x-linux64v2.c      | 2 ++
 gdb/features/s390x-linux64v2.xml    | 1 +
 gdb/features/s390x-te-linux64.c     | 2 ++
 gdb/features/s390x-te-linux64.xml   | 1 +
 gdb/features/s390x-tevx-linux64.c   | 2 ++
 gdb/features/s390x-tevx-linux64.xml | 1 +
 gdb/features/s390x-vx-linux64.c     | 2 ++
 gdb/features/s390x-vx-linux64.xml   | 1 +
 38 files changed, 57 insertions(+)
  

Comments

Kevin Buettner Oct. 31, 2024, 2:17 a.m. UTC | #1
On Sun, 27 Oct 2024 20:07:40 +0000
Andrew Burgess <aburgess@redhat.com> wrote:

> Some of the top level (i.e. those that contain the <target> element)
> xml files in gdb/features/ are clearly Linux only.  I conclude this
> based on the files names containing the string "linux".
> 
> I think that all of these files should have the <osabi> element
> included with the value "GNU/Linux".
> 
> This commits adds the <osabi> element where I believe it is
> appropriate and regenerates the associated .c files.
> 
> The benefit of this change is that gdbserver, which makes use of these
> files, will now send the osabi back in more cases.  Sending back more
> descriptive target descriptions is a good thing as this makes it
> easier for GDB to select the correct gdbarch.

LGTM.

Approved-by: Kevin Buettner <kevinb@redhat.com>
  

Patch

diff --git a/gdb/features/mips64-dsp-linux.c b/gdb/features/mips64-dsp-linux.c
index 7ea0bb704f4..646f5487f49 100644
--- a/gdb/features/mips64-dsp-linux.c
+++ b/gdb/features/mips64-dsp-linux.c
@@ -11,6 +11,8 @@  initialize_tdesc_mips64_dsp_linux (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("mips"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cpu");
diff --git a/gdb/features/mips64-dsp-linux.xml b/gdb/features/mips64-dsp-linux.xml
index 69518e496c4..6c108555490 100644
--- a/gdb/features/mips64-dsp-linux.xml
+++ b/gdb/features/mips64-dsp-linux.xml
@@ -8,6 +8,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>mips</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="mips64-cpu.xml"/>
   <xi:include href="mips64-cp0.xml"/>
   <xi:include href="mips64-fpu.xml"/>
diff --git a/gdb/features/mips64-linux.c b/gdb/features/mips64-linux.c
index f4dcf8bc109..98b3d34448d 100644
--- a/gdb/features/mips64-linux.c
+++ b/gdb/features/mips64-linux.c
@@ -11,6 +11,8 @@  initialize_tdesc_mips64_linux (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("mips"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.mips.cpu");
diff --git a/gdb/features/mips64-linux.xml b/gdb/features/mips64-linux.xml
index 4c99206b5bd..f861982a8e9 100644
--- a/gdb/features/mips64-linux.xml
+++ b/gdb/features/mips64-linux.xml
@@ -8,6 +8,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>mips</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="mips64-cpu.xml"/>
   <xi:include href="mips64-cp0.xml"/>
   <xi:include href="mips64-fpu.xml"/>
diff --git a/gdb/features/s390-gs-linux64.c b/gdb/features/s390-gs-linux64.c
index 49ea08b2c39..ab6ad6f21e3 100644
--- a/gdb/features/s390-gs-linux64.c
+++ b/gdb/features/s390-gs-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_gs_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-gs-linux64.xml b/gdb/features/s390-gs-linux64.xml
index 035e794643d..e33e8a42f6b 100644
--- a/gdb/features/s390-gs-linux64.xml
+++ b/gdb/features/s390-gs-linux64.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-linux32.c b/gdb/features/s390-linux32.c
index 43ceb9c008e..e45321a2099 100644
--- a/gdb/features/s390-linux32.c
+++ b/gdb/features/s390-linux32.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_linux32 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-linux32.xml b/gdb/features/s390-linux32.xml
index 4225e5cb120..6a51c21d07c 100644
--- a/gdb/features/s390-linux32.xml
+++ b/gdb/features/s390-linux32.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core32.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-linux32v1.c b/gdb/features/s390-linux32v1.c
index 291784fdac7..cea14c16969 100644
--- a/gdb/features/s390-linux32v1.c
+++ b/gdb/features/s390-linux32v1.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_linux32v1 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-linux32v1.xml b/gdb/features/s390-linux32v1.xml
index 60f8ab650ea..63780765f98 100644
--- a/gdb/features/s390-linux32v1.xml
+++ b/gdb/features/s390-linux32v1.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core32.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-linux32v2.c b/gdb/features/s390-linux32v2.c
index 6fa26daa537..182ab2f0b60 100644
--- a/gdb/features/s390-linux32v2.c
+++ b/gdb/features/s390-linux32v2.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_linux32v2 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-linux32v2.xml b/gdb/features/s390-linux32v2.xml
index 58b1478ee4f..0646ce3f2e0 100644
--- a/gdb/features/s390-linux32v2.xml
+++ b/gdb/features/s390-linux32v2.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core32.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-linux64.c b/gdb/features/s390-linux64.c
index 74c338c1fa6..8bcec095174 100644
--- a/gdb/features/s390-linux64.c
+++ b/gdb/features/s390-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-linux64.xml b/gdb/features/s390-linux64.xml
index dcd50296983..e8d8f03eae7 100644
--- a/gdb/features/s390-linux64.xml
+++ b/gdb/features/s390-linux64.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-linux64v1.c b/gdb/features/s390-linux64v1.c
index 0aebbdb6b7a..3a6394b513d 100644
--- a/gdb/features/s390-linux64v1.c
+++ b/gdb/features/s390-linux64v1.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_linux64v1 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-linux64v1.xml b/gdb/features/s390-linux64v1.xml
index a849e793acd..fc63a165236 100644
--- a/gdb/features/s390-linux64v1.xml
+++ b/gdb/features/s390-linux64v1.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-linux64v2.c b/gdb/features/s390-linux64v2.c
index 3b3b4916ac3..5ff9a5709ef 100644
--- a/gdb/features/s390-linux64v2.c
+++ b/gdb/features/s390-linux64v2.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_linux64v2 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-linux64v2.xml b/gdb/features/s390-linux64v2.xml
index 4bbfb09b2fb..3d0c9f9b210 100644
--- a/gdb/features/s390-linux64v2.xml
+++ b/gdb/features/s390-linux64v2.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-te-linux64.c b/gdb/features/s390-te-linux64.c
index d49e7441313..2abddd53bfa 100644
--- a/gdb/features/s390-te-linux64.c
+++ b/gdb/features/s390-te-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_te_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-te-linux64.xml b/gdb/features/s390-te-linux64.xml
index e141e0b789c..399053a0319 100644
--- a/gdb/features/s390-te-linux64.xml
+++ b/gdb/features/s390-te-linux64.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-tevx-linux64.c b/gdb/features/s390-tevx-linux64.c
index ffe1ddf4ee1..8e38a5cf81f 100644
--- a/gdb/features/s390-tevx-linux64.c
+++ b/gdb/features/s390-tevx-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_tevx_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-tevx-linux64.xml b/gdb/features/s390-tevx-linux64.xml
index f9dc796e66d..2dbb0399b9c 100644
--- a/gdb/features/s390-tevx-linux64.xml
+++ b/gdb/features/s390-tevx-linux64.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390-vx-linux64.c b/gdb/features/s390-vx-linux64.c
index 30262a63fce..1ce5ad3671a 100644
--- a/gdb/features/s390-vx-linux64.c
+++ b/gdb/features/s390-vx-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390_vx_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:31-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390-vx-linux64.xml b/gdb/features/s390-vx-linux64.xml
index fe55fb22565..6b32bf8130b 100644
--- a/gdb/features/s390-vx-linux64.xml
+++ b/gdb/features/s390-vx-linux64.xml
@@ -11,6 +11,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:31-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390x-gs-linux64.c b/gdb/features/s390x-gs-linux64.c
index 501b3b24061..76b8124863a 100644
--- a/gdb/features/s390x-gs-linux64.c
+++ b/gdb/features/s390x-gs-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390x_gs_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390x-gs-linux64.xml b/gdb/features/s390x-gs-linux64.xml
index 6131aaa9e38..c41e460d91c 100644
--- a/gdb/features/s390x-gs-linux64.xml
+++ b/gdb/features/s390x-gs-linux64.xml
@@ -10,6 +10,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:64-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390x-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390x-linux64.c b/gdb/features/s390x-linux64.c
index 8655d5a6116..eb6b181f599 100644
--- a/gdb/features/s390x-linux64.c
+++ b/gdb/features/s390x-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390x_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390x-linux64.xml b/gdb/features/s390x-linux64.xml
index a70f6372c25..31afe82dadc 100644
--- a/gdb/features/s390x-linux64.xml
+++ b/gdb/features/s390x-linux64.xml
@@ -10,6 +10,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:64-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390x-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390x-linux64v1.c b/gdb/features/s390x-linux64v1.c
index 11bfd85c995..6b43f88ac84 100644
--- a/gdb/features/s390x-linux64v1.c
+++ b/gdb/features/s390x-linux64v1.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390x_linux64v1 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390x-linux64v1.xml b/gdb/features/s390x-linux64v1.xml
index ffc0505202e..8aa26b4f587 100644
--- a/gdb/features/s390x-linux64v1.xml
+++ b/gdb/features/s390x-linux64v1.xml
@@ -10,6 +10,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:64-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390x-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390x-linux64v2.c b/gdb/features/s390x-linux64v2.c
index 400b1af4485..eeba787ec7b 100644
--- a/gdb/features/s390x-linux64v2.c
+++ b/gdb/features/s390x-linux64v2.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390x_linux64v2 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390x-linux64v2.xml b/gdb/features/s390x-linux64v2.xml
index 4b2abc60dad..3769a75db40 100644
--- a/gdb/features/s390x-linux64v2.xml
+++ b/gdb/features/s390x-linux64v2.xml
@@ -10,6 +10,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:64-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390x-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390x-te-linux64.c b/gdb/features/s390x-te-linux64.c
index 74883e30fe8..0fec2b0bd02 100644
--- a/gdb/features/s390x-te-linux64.c
+++ b/gdb/features/s390x-te-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390x_te_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390x-te-linux64.xml b/gdb/features/s390x-te-linux64.xml
index b38c7c0ac12..c48831d54e5 100644
--- a/gdb/features/s390x-te-linux64.xml
+++ b/gdb/features/s390x-te-linux64.xml
@@ -10,6 +10,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:64-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390x-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390x-tevx-linux64.c b/gdb/features/s390x-tevx-linux64.c
index 1d45d6044c1..c1b890045d3 100644
--- a/gdb/features/s390x-tevx-linux64.c
+++ b/gdb/features/s390x-tevx-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390x_tevx_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390x-tevx-linux64.xml b/gdb/features/s390x-tevx-linux64.xml
index 2d7672e1dca..a53bfff5ac7 100644
--- a/gdb/features/s390x-tevx-linux64.xml
+++ b/gdb/features/s390x-tevx-linux64.xml
@@ -10,6 +10,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:64-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390x-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>
diff --git a/gdb/features/s390x-vx-linux64.c b/gdb/features/s390x-vx-linux64.c
index 4de6585a227..af57e052eab 100644
--- a/gdb/features/s390x-vx-linux64.c
+++ b/gdb/features/s390x-vx-linux64.c
@@ -11,6 +11,8 @@  initialize_tdesc_s390x_vx_linux64 (void)
   target_desc_up result = allocate_target_description ();
   set_tdesc_architecture (result.get (), bfd_scan_arch ("s390:64-bit"));
 
+  set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
+
   struct tdesc_feature *feature;
 
   feature = tdesc_create_feature (result.get (), "org.gnu.gdb.s390.core");
diff --git a/gdb/features/s390x-vx-linux64.xml b/gdb/features/s390x-vx-linux64.xml
index 8903f1871e2..fcf75deb588 100644
--- a/gdb/features/s390x-vx-linux64.xml
+++ b/gdb/features/s390x-vx-linux64.xml
@@ -10,6 +10,7 @@ 
 <!DOCTYPE target SYSTEM "gdb-target.dtd">
 <target>
   <architecture>s390:64-bit</architecture>
+  <osabi>GNU/Linux</osabi>
   <xi:include href="s390x-core64.xml"/>
   <xi:include href="s390-acr.xml"/>
   <xi:include href="s390-fpr.xml"/>