]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86-64: Update R_X86_64_TPOFF32 error message
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 10 Sep 2025 19:18:11 +0000 (12:18 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 11 Sep 2025 12:43:04 +0000 (05:43 -0700)
Change R_X86_64_TPOFF32 error message from

relocation R_X86_64_TPOFF32 against symbol `foo' can not be used when making a shared object; replace local-exec with initial-exec TLS model

to

relocation R_X86_64_TPOFF32 against symbol `foo' can not be used when making a shared object; local-exec is incompatible with -shared

bfd/

PR ld/33408
* elf64-x86-64.c (elf_x86_64_need_pic): Suggest "replace
local-exec with initial-exec TLS model" for R_X86_64_TPOFF32.

ld/

PR ld/33408
* testsuite/ld-x86-64/tls-le-pic-1-x32.d: Updated.
* testsuite/ld-x86-64/tls-le-pic-1.d: Likewise.
* testsuite/ld-x86-64/tls-le-pic-2-x32.d: Likewise.
* testsuite/ld-x86-64/tls-le-pic-2.d: Likewise.
* testsuite/ld-x86-64/tls-le-pic-3-x32.d: Likewise.
* testsuite/ld-x86-64/tls-le-pic-3.d: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
bfd/elf64-x86-64.c
ld/testsuite/ld-x86-64/tls-le-pic-1-x32.d
ld/testsuite/ld-x86-64/tls-le-pic-1.d
ld/testsuite/ld-x86-64/tls-le-pic-2-x32.d
ld/testsuite/ld-x86-64/tls-le-pic-2.d
ld/testsuite/ld-x86-64/tls-le-pic-3-x32.d
ld/testsuite/ld-x86-64/tls-le-pic-3.d

index ad99cf6754e4ca29f4037ea6d1198dc933312b55..236cff9734684db2eba4ac48b522b0b9a45c40e9 100644 (file)
@@ -1718,7 +1718,7 @@ elf_x86_64_need_pic (struct bfd_link_info *info,
       object = _("a shared object");
       if (!pic)
        pic = (howto->type == R_X86_64_TPOFF32
-              ? _("; replace local-exec with initial-exec TLS model")
+              ? _("; local-exec is incompatible with -shared")
               : _("; recompile with -fPIC"));
     }
   else
index b0824c4ae101bea6d75e2780aa6b140eec160fc6..29df9ec6bec7ade198b5c62303c7ef25256bb487 100644 (file)
@@ -1,4 +1,4 @@
 #source: tls-le-pic-1.s
 #as: --x32
 #ld: -shared -melf32_x86_64
-#error: .*: relocation R_X86_64_TPOFF32 against symbol `foo' can not be used when making a shared object; replace local-exec with initial-exec TLS model
+#error: .*: relocation R_X86_64_TPOFF32 against symbol `foo' can not be used when making a shared object; local-exec is incompatible with -shared
index 6db5f029e75d836cf4596f6e471a27733ce86415..9726c5c60c67ded73389bcf453fa547c034a928c 100644 (file)
@@ -1,3 +1,3 @@
 #as: --64
 #ld: -shared -melf_x86_64
-#error: .*: relocation R_X86_64_TPOFF32 against symbol `foo' can not be used when making a shared object; replace local-exec with initial-exec TLS model
+#error: .*: relocation R_X86_64_TPOFF32 against symbol `foo' can not be used when making a shared object; local-exec is incompatible with -shared
index e16395a556843a1b07cfed360f320a65486f02f1..b4ebf5ac78f5c5c36d5aea1b0fdd4edd88c857be 100644 (file)
@@ -1,4 +1,4 @@
 #source: tls-le-pic-2.s
 #as: --x32
 #ld: -shared -melf32_x86_64
-#error: .*: relocation R_X86_64_TPOFF32 against undefined symbol `foo' can not be used when making a shared object; replace local-exec with initial-exec TLS model
+#error: .*: relocation R_X86_64_TPOFF32 against undefined symbol `foo' can not be used when making a shared object; local-exec is incompatible with -shared
index 0e718e01ebc10d70848a809233228996315e7f36..90ca63429e74296d7f8d6c4f087af7e94f9718d4 100644 (file)
@@ -1,3 +1,3 @@
 #as: --64
 #ld: -shared -melf_x86_64
-#error: .*: relocation R_X86_64_TPOFF32 against undefined symbol `foo' can not be used when making a shared object; replace local-exec with initial-exec TLS model
+#error: .*: relocation R_X86_64_TPOFF32 against undefined symbol `foo' can not be used when making a shared object; local-exec is incompatible with -shared
index f6731daa9911ea4e6f2a3b8a4ed0614cee283c7f..ed832e4b00a858284ae9996e2b21e05c3e77c949 100644 (file)
@@ -1,4 +1,4 @@
 #source: tls-le-pic-3.s
 #as: --x32
 #ld: -shared -melf32_x86_64
-#error: .*: relocation R_X86_64_TPOFF32 against `foo' can not be used when making a shared object; replace local-exec with initial-exec TLS model
+#error: .*: relocation R_X86_64_TPOFF32 against `foo' can not be used when making a shared object; local-exec is incompatible with -shared
index 987e370ad17a1731c7313e0d7507f1f2d627ce70..849706794981ce040429df1ac3e00a5f96a3ef25 100644 (file)
@@ -1,3 +1,3 @@
 #as: --64
 #ld: -shared -melf_x86_64
-#error: .*: relocation R_X86_64_TPOFF32 against `foo' can not be used when making a shared object; replace local-exec with initial-exec TLS model
+#error: .*: relocation R_X86_64_TPOFF32 against `foo' can not be used when making a shared object; local-exec is incompatible with -shared