From patchwork Mon Mar 9 20:26:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 5538 Received: (qmail 119330 invoked by alias); 9 Mar 2015 20:26:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 119320 invoked by uid 89); 9 Mar 2015 20:26:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga09.intel.com X-ExtLoop1: 1 Date: Mon, 9 Mar 2015 13:26:36 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] [BZ #18078] FAIL: elf/check-localplt with ld from binutils 2.26 Message-ID: <20150309202636.GA24131@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with R_*_GLOB_DAT relocation against the same symbol. It makes R_*_JUMP_SLOT relocations against free and malloc optional. We should mark PLT entries for free and malloc optional. OK for master? Thanks. H.J. --- [BZ #18078] * sysdeps/unix/sysv/linux/i386/localplt.data: Mark PLT entries for free and malloc optional. * sysdeps/x86_64/localplt.data: New file. --- sysdeps/unix/sysv/linux/i386/localplt.data | 9 ++++++--- sysdeps/x86_64/localplt.data | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 sysdeps/x86_64/localplt.data diff --git a/sysdeps/unix/sysv/linux/i386/localplt.data b/sysdeps/unix/sysv/linux/i386/localplt.data index b25abf8..9d70ba7 100644 --- a/sysdeps/unix/sysv/linux/i386/localplt.data +++ b/sysdeps/unix/sysv/linux/i386/localplt.data @@ -1,7 +1,10 @@ +# Linker in binutils 2.26 and newer consolidates R_X86_64_JUMP_SLOT +# relocation with R_386_GLOB_DAT relocation against the same symbol. +# It makes R_386_JUMP_SLOT relocations against free and malloc optional. libc.so: _Unwind_Find_FDE libc.so: calloc -libc.so: free -libc.so: malloc +libc.so: free ? +libc.so: malloc ? libc.so: memalign libc.so: realloc libm.so: matherr @@ -12,4 +15,4 @@ ld.so: __libc_memalign ld.so: malloc ld.so: calloc ld.so: realloc -ld.so: free +ld.so: free ? diff --git a/sysdeps/x86_64/localplt.data b/sysdeps/x86_64/localplt.data new file mode 100644 index 0000000..165259a --- /dev/null +++ b/sysdeps/x86_64/localplt.data @@ -0,0 +1,20 @@ +# See scripts/check-localplt.awk for how this file is processed. +# PLT use is required for the malloc family and for matherr because +# users can define their own functions and have library internals call them. +# Linker in binutils 2.26 and newer consolidates R_X86_64_JUMP_SLOT +# relocation with R_X86_64_GLOB_DAT relocation against the same symbol. +# It makes R_X86_64_JUMP_SLOT relocations against free and malloc optional. +libc.so: calloc +libc.so: free ? +libc.so: malloc ? +libc.so: memalign +libc.so: realloc +libm.so: matherr +# The dynamic loader uses __libc_memalign internally to allocate aligned +# TLS storage. The other malloc family of functions are expected to allow +# user symbol interposition. +ld.so: __libc_memalign +ld.so: malloc +ld.so: calloc +ld.so: realloc +ld.so: free ?