commit:     07f1295681d48567dfc62dd15593cf57d4b240e5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 19 20:53:44 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 19 20:54:26 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/toolchain/binutils-patches.git/commit/?id=07f12956

9999: refresh patch

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...Add-GLIBC_ABI_GNU2_TLS-version-dependency.patch | 56 ++++++++++++----------
 1 file changed, 32 insertions(+), 24 deletions(-)

diff --git a/9999/0007-x86-Add-GLIBC_ABI_GNU2_TLS-version-dependency.patch 
b/9999/0007-x86-Add-GLIBC_ABI_GNU2_TLS-version-dependency.patch
index 63b7fa1..4c33ef0 100644
--- a/9999/0007-x86-Add-GLIBC_ABI_GNU2_TLS-version-dependency.patch
+++ b/9999/0007-x86-Add-GLIBC_ABI_GNU2_TLS-version-dependency.patch
@@ -1,8 +1,7 @@
-From 40fd19259a3b9a576bedba9f9ce236d2f1b42da9 Mon Sep 17 00:00:00 2001
-Message-ID: 
<40fd19259a3b9a576bedba9f9ce236d2f1b42da9.1755548203.git....@gentoo.org>
+From b6b200c936241a908de6d0c9e8c13db8cf16a31f Mon Sep 17 00:00:00 2001
 From: "H.J. Lu" <[email protected]>
-Date: Mon, 18 Aug 2025 13:13:20 -0700
-Subject: [PATCH 1/3] x86: Add GLIBC_ABI_GNU2_TLS version dependency
+Date: Fri, 4 Jul 2025 08:39:03 +0800
+Subject: [PATCH] x86: Add GLIBC_ABI_GNU2_TLS version dependency
 
 On Linux/x86, programs and shared libraries compiled with
 -mtls-dialect=gnu2 may fail silently at run-time against glibc without
@@ -46,6 +45,8 @@ bfd/
        (elf_x86_64_add_glibc_version_dependency): Add GLIBC_ABI_GNU2_TLS
        version dependency if GLIBC_ABI_GNU2_TLS dependency isn't disabled
        and has_tlsdesc_call isn't 0.
+       (elf_backend_add_glibc_version_dependency): Undef before CloudABI
+       support and redefine for elf32-x86-64.
        * elflink.c (elf_link_add_glibc_verneed): Changed to return bool.
        Remove the pointer to elf_find_verdep_info argument.  Add a
        pointer to bool argument, auto_version. Return true if linked
@@ -56,8 +57,6 @@ bfd/
        bool argument and pass it to elf_link_add_glibc_verneed.
        (_bfd_elf_link_add_dt_relr_dependency): Pass NULL to
        _bfd_elf_link_add_glibc_version_dependency.
-       (elf_backend_add_glibc_version_dependency): Undef before CloudABI
-       support.
        * elfxx-x86.h (elf_x86_link_hash_table): Add has_tls_desc_call.
 
 ld/
@@ -109,7 +108,7 @@ Signed-off-by: H.J. Lu <[email protected]>
  bfd/elf-bfd.h                         |   2 +-
  bfd/elf-linker-x86.h                  |   8 ++
  bfd/elf32-i386.c                      |  44 ++++++++-
- bfd/elf64-x86-64.c                    |  32 +++++--
+ bfd/elf64-x86-64.c                    |  36 +++++--
  bfd/elflink.c                         | 130 +++++++++++++++-----------
  bfd/elfxx-x86.h                       |   4 +
  ld/NEWS                               |   6 ++
@@ -142,7 +141,7 @@ Signed-off-by: H.J. Lu <[email protected]>
  ld/testsuite/ld-x86-64/mark-plt-2.rd  |   7 ++
  ld/testsuite/ld-x86-64/mark-plt-2.s   |  13 +++
  ld/testsuite/ld-x86-64/x86-64.exp     |  26 +++++-
- 36 files changed, 592 insertions(+), 125 deletions(-)
+ 36 files changed, 596 insertions(+), 125 deletions(-)
  create mode 100644 ld/emultempl/elf-i386-glibc.em
  create mode 100644 ld/emultempl/elf-x86-64-glibc.em
  create mode 100644 ld/emultempl/elf-x86-64.em
@@ -190,7 +189,7 @@ index 2c98257038f..fe322152e14 100644
    unsigned int isa_level;
  
 diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
-index abe26e476ff..c1115a52d1b 100644
+index b755b39ab55..9d06f1494cf 100644
 --- a/bfd/elf32-i386.c
 +++ b/bfd/elf32-i386.c
 @@ -1687,6 +1687,10 @@ elf_i386_scan_relocs (bfd *abfd,
@@ -273,7 +272,7 @@ index abe26e476ff..c1115a52d1b 100644
  
  #undef        TARGET_LITTLE_SYM
 diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
-index b6f97b5b69b..edfa608d2d7 100644
+index b6fd466178e..1edce6e8703 100644
 --- a/bfd/elf64-x86-64.c
 +++ b/bfd/elf64-x86-64.c
 @@ -2694,6 +2694,10 @@ elf_x86_64_scan_relocs (bfd *abfd, struct bfd_link_info 
*info,
@@ -347,11 +346,22 @@ index b6f97b5b69b..edfa608d2d7 100644
  /* CloudABI support.  */
  
  #undef        TARGET_LITTLE_SYM
+@@ -6479,6 +6499,10 @@ elf64_x86_64_copy_solaris_special_section_fields (const 
bfd *ibfd ATTRIBUTE_UNUS
+ #define elf_backend_bfd_from_remote_memory \
+   _bfd_elf32_bfd_from_remote_memory
+ 
++#undef elf_backend_add_glibc_version_dependency
++#define elf_backend_add_glibc_version_dependency \
++  elf_x86_64_add_glibc_version_dependency
++
+ #undef elf_backend_size_info
+ #define elf_backend_size_info \
+   _bfd_elf32_size_info
 diff --git a/bfd/elflink.c b/bfd/elflink.c
-index 7b0375406ac..ac40423751f 100644
+index f6c0c04e82e..d2c43f31bf5 100644
 --- a/bfd/elflink.c
 +++ b/bfd/elflink.c
-@@ -2283,68 +2283,85 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, 
void *data)
+@@ -2281,68 +2281,85 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, 
void *data)
    return true;
  }
  
@@ -480,7 +490,7 @@ index 7b0375406ac..ac40423751f 100644
      }
  
    /* Skip if 2.GLIBC_MINOR_BASE includes VERSION_DEP.  */
-@@ -2352,7 +2369,7 @@ elf_link_add_glibc_verneed (struct elf_find_verdep_info 
*rinfo,
+@@ -2350,7 +2367,7 @@ elf_link_add_glibc_verneed (struct elf_find_verdep_info 
*rinfo,
      {
        minor_version = strtol (version_dep + 8, NULL, 10);
        if (minor_version <= *glibc_minor_base)
@@ -489,7 +499,7 @@ index 7b0375406ac..ac40423751f 100644
      }
  
    amt = sizeof *a;
-@@ -2360,7 +2377,8 @@ elf_link_add_glibc_verneed (struct elf_find_verdep_info 
*rinfo,
+@@ -2358,7 +2375,8 @@ elf_link_add_glibc_verneed (struct elf_find_verdep_info 
*rinfo,
    if (a == NULL)
      {
        rinfo->failed = true;
@@ -499,7 +509,7 @@ index 7b0375406ac..ac40423751f 100644
      }
  
    a->vna_nodename = version_dep;
-@@ -2371,7 +2389,13 @@ elf_link_add_glibc_verneed (struct elf_find_verdep_info 
*rinfo,
+@@ -2369,7 +2387,13 @@ elf_link_add_glibc_verneed (struct elf_find_verdep_info 
*rinfo,
  
    t->vn_auxptr = a;
  
@@ -514,7 +524,7 @@ index 7b0375406ac..ac40423751f 100644
  }
  
  /* Add VERSION_DEP to the list of version dependencies when linked
-@@ -2380,19 +2404,19 @@ elf_link_add_glibc_verneed (struct 
elf_find_verdep_info *rinfo,
+@@ -2378,19 +2402,19 @@ elf_link_add_glibc_verneed (struct 
elf_find_verdep_info *rinfo,
  void
  _bfd_elf_link_add_glibc_version_dependency
    (struct elf_find_verdep_info *rinfo,
@@ -540,7 +550,7 @@ index 7b0375406ac..ac40423751f 100644
      }
    while (*version_dep != NULL);
  }
-@@ -2410,7 +2434,7 @@ _bfd_elf_link_add_dt_relr_dependency (struct 
elf_find_verdep_info *rinfo)
+@@ -2408,7 +2432,7 @@ _bfd_elf_link_add_dt_relr_dependency (struct 
elf_find_verdep_info *rinfo)
          "GLIBC_ABI_DT_RELR",
          NULL
        };
@@ -1153,10 +1163,10 @@ index 413335ad765..0e13f7d8e35 100644
  @cindex groups of archives
  @item -( @var{archives} -)
 diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 815da76a4c0..286ab0ba6d1 100644
+index d0c2e5d6db8..020712df0e7 100644
 --- a/ld/ldlex.h
 +++ b/ld/ldlex.h
-@@ -471,6 +471,9 @@ enum option_values
+@@ -469,6 +469,9 @@ enum option_values
    OPTION_NO_LITERAL_MOVEMENT,
    OPTION_ABI_WINDOWED,
    OPTION_ABI_CALL0,
@@ -1313,10 +1323,10 @@ index 00000000000..c816567c204
 +      ret
 +      .section        .note.GNU-stack,"",@progbits
 diff --git a/ld/testsuite/ld-x86-64/x86-64.exp 
b/ld/testsuite/ld-x86-64/x86-64.exp
-index 6b86bc3d018..1b011451bcc 100644
+index a72a7da12c1..25480f70185 100644
 --- a/ld/testsuite/ld-x86-64/x86-64.exp
 +++ b/ld/testsuite/ld-x86-64/x86-64.exp
-@@ -2358,7 +2358,7 @@ run_dump_test "ibt-plt-3b-x32"
+@@ -2360,7 +2360,7 @@ run_dump_test "ibt-plt-3b-x32"
  run_dump_test "ibt-plt-3c-x32"
  run_dump_test "ibt-plt-3d-x32"
  
@@ -1325,7 +1335,7 @@ index 6b86bc3d018..1b011451bcc 100644
  if { [istarget "x86_64-*-musl*"]} {
      set ASFLAGS "$saved_ASFLAGS"
      return
-@@ -2384,6 +2384,30 @@ if { [check_compiler_available] } {
+@@ -2386,6 +2386,30 @@ if { [check_compiler_available] } {
             {readelf {-W --version-info} mark-plt-1b.rd}} \
            "mark-plt-1.so" \
        ] \
@@ -1356,8 +1366,6 @@ index 6b86bc3d018..1b011451bcc 100644
      ]
  }
  
-
-base-commit: b6ebe65cdac1afc15d5459318007be2d1d8832d0
 -- 
 2.50.1
 

Reply via email to