From: Sergei Trofimovich Date: Sat, 11 Jul 2020 17:06:51 +0000 (+0300) Subject: ia64: Work around miscompilation and fix build on ia64's gcc-10 and later X-Git-Tag: upstream/2.39~427 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=073edbdfabaad4786e974a451efe4b6b3f7a5a61;p=platform%2Fupstream%2Fglibc.git 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 Signed-off-by: Sergei Trofimovich Signed-off-by: Andreas K. Hüttel --- diff --git a/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h b/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h index 3e4d5da..5b3a5ad 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" \