This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Use comdat instead of .gnu.linkonce for i386 setup pic register
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Mon, 9 Jan 2017 17:48:21 -0200
- Subject: [PATCH] Use comdat instead of .gnu.linkonce for i386 setup pic register
- Authentication-results: sourceware.org; auth=none
GCC has moved from using .gnu.linkonce for i386 setup pic register with
minimum current version (as for binutils minimum binutils that support
comdat). This patch replace linkonce usage by comdat.
Checked on i686-linux-gnu.
[BZ #20543]
* sysdeps/i386/sysdep.h (SETUP_PIC_REG): Use comdat instead of
gnu.linkonce section.
(SETUP_PIC_REG_STR): Likewise.
---
ChangeLog | 7 +++++++
sysdeps/i386/sysdep.h | 5 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
index d2b0860..35d65a4 100644
--- a/sysdeps/i386/sysdep.h
+++ b/sysdeps/i386/sysdep.h
@@ -97,7 +97,7 @@ lose: SYSCALL_PIC_SETUP \
# define SETUP_PIC_REG(reg) \
.ifndef GET_PC_THUNK(reg); \
- .section .gnu.linkonce.t.GET_PC_THUNK(reg),"ax",@progbits; \
+ .section .text.GET_PC_THUNK(reg),"axG",@progbits,GET_PC_THUNK(reg),comdat; \
.globl GET_PC_THUNK(reg); \
.hidden GET_PC_THUNK(reg); \
.p2align 4; \
@@ -140,7 +140,8 @@ GET_PC_THUNK(reg): \
# define SETUP_PIC_REG_STR(reg) \
".ifndef " GET_PC_THUNK_STR (reg) "\n" \
- ".section .gnu.linkonce.t." GET_PC_THUNK_STR (reg) ",\"ax\",@progbits\n" \
+ ".section .text." GET_PC_THUNK_STR (reg) ",\"axG\",@progbits," \
+ GET_PC_THUNK_STR (reg) ",comdat\n" \
".globl " GET_PC_THUNK_STR (reg) "\n" \
".hidden " GET_PC_THUNK_STR (reg) "\n" \
".p2align 4\n" \
--
2.7.4