From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70577 invoked by alias); 11 Aug 2017 16:44:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 68999 invoked by uid 89); 11 Aug 2017 16:44:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f42.google.com Received: from mail-oi0-f42.google.com (HELO mail-oi0-f42.google.com) (209.85.218.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Aug 2017 16:44:13 +0000 Received: by mail-oi0-f42.google.com with SMTP id e124so38413986oig.2 for ; Fri, 11 Aug 2017 09:44:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Qlr9zasl7MObGzvcd06QJ/rWbCFF2KX+gbmZTKjw1GU=; b=YZUsw7zLC8VkrOFdMsa88VTBywL83dbWzcPahqS/Sh2n5ZOwYLFwPZDTwfZDp7EE+H Hy21TYJbQNF9Xr8bJw7AghYDOcCrxtGsR213cjk87qF/xtMDYtJJKwxvKpfCpVun/z9T Iti3DAl3+rnN/VFIz6ugLXJ0yhXeWvB8ixmZUPxITrGhFURjZyLHDaNx62VhQuUOmhO+ Dw92ShHc90Gcry1IDOg6k/YDdHyAoLrQKFa/W899klfzpaR3owHat1exElU1t4N0ZFrO hfiRz8zrccp1e5/x2TwjMPp4TPwdGwxP03zlw6rOrslP0RZ+bOasH14Pz+EwfmGmaZqi qdGQ== X-Gm-Message-State: AHYfb5iY6z+L6LxCLv797w18YRrG7KOgd0JMeK+CSnMCNFhlTW3hxt6v VWtxYxjikp8SsBWRO9iBAzSC32ZUQQ== X-Received: by 10.202.179.85 with SMTP id c82mr17149273oif.5.1502469851657; Fri, 11 Aug 2017 09:44:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.136.75 with HTTP; Fri, 11 Aug 2017 09:44:10 -0700 (PDT) In-Reply-To: <20170811154542.GK8039@1170ee0b50d5> References: <20170811092709.GH8039@1170ee0b50d5> <20170811154542.GK8039@1170ee0b50d5> From: "H.J. Lu" Date: Fri, 11 Aug 2017 16:44:00 -0000 Message-ID: Subject: Re: Synthetic symbol leak in in elf_x86_64_get_synthetic_symtab and elf_read_minimal_symbols To: Yao Qi Cc: Alex Lindsay , GDB Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00249.txt.bz2 On Fri, Aug 11, 2017 at 8:45 AM, Yao Qi wrote: > On 17-08-11 08:30:21, H.J. Lu wrote: >> > >> > We can only safely do this, but .name is leaked for x86_64. Other >> > tools using bfd, like objdump, nm, and gprof may have this issue too. >> > I'll ask binutils people on asymbol allocation and de-allocation. >> > >> >> This is: >> >> https://sourceware.org/bugzilla/show_bug.cgi?id=21943 >> > > I opened it :) > >> i386 and x86-64 get_synthetic_symtab don't know if @plt should >> be added to symbol name for a PLT entry. The first pass checks >> if @plt is needed and extra space is allocated in the second pass. >> We can assume @plt is needed and waste some space if it isn't. > > Do you plan to fix it? > Done. -- H.J.