about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2020-07-11 20:06:51 +0300
committerAndreas K. Hüttel <dilfridge@gentoo.org>2023-09-11 19:19:46 +0200
commit073edbdfabaad4786e974a451efe4b6b3f7a5a61 (patch)
tree3990887a52a9c4c024f28a401dc0faafa47fe15c /sysdeps/unix
parent5f798d38e967c62cca40c99bfc3e9c5ca0f37540 (diff)
downloadglibc-073edbdfabaad4786e974a451efe4b6b3f7a5a61.tar.gz
glibc-073edbdfabaad4786e974a451efe4b6b3f7a5a61.tar.xz
glibc-073edbdfabaad4786e974a451efe4b6b3f7a5a61.zip
ia64: Work around miscompilation and fix build on ia64's gcc-10 and later
Needed since gcc-10 enabled -fno-common by default.

[In use in Gentoo since gcc-10, no problems observed.
Also discussed with and reviewed by Jessica Clarke from
Debian. Andreas]

Bug: https://bugs.gentoo.org/723268
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/ia64/dl-sysdep.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h b/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
index 3e4d5da820..5b3a5ad15f 100644
--- a/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
@@ -32,7 +32,9 @@
 #ifndef __ASSEMBLER__
 /* Don't declare this as a function---we want it's entry-point, not
    it's function descriptor... */
-extern int _dl_sysinfo_break attribute_hidden;
+/* Use section ".text" to force far GPREL64 relocation instead of
+   GPREL22. */
+extern int _dl_sysinfo_break attribute_hidden __attribute__((section(".text")));
 # define DL_SYSINFO_DEFAULT ((uintptr_t) &_dl_sysinfo_break)
 # define DL_SYSINFO_IMPLEMENTATION		\
   asm (".text\n\t"				\