From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26961 invoked by alias); 3 Jun 2019 15:03:10 -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 26952 invoked by uid 89); 3 Jun 2019 15:03:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=gdb's, gdbs X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Jun 2019 15:03:09 +0000 Received: from [172.16.0.120] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 383831E059; Mon, 3 Jun 2019 11:03:07 -0400 (EDT) Subject: Re: [RFC 2/2] Move gdb's xmalloc and friends to new file To: Tom Tromey , gdb-patches@sourceware.org References: <20190530213046.20542-1-tom@tromey.com> <20190530213046.20542-3-tom@tromey.com> From: Simon Marchi Message-ID: <4042ab05-d68e-15b7-a025-e51b679b376a@simark.ca> Date: Mon, 03 Jun 2019 15:03:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190530213046.20542-3-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-06/txt/msg00026.txt.bz2 On 2019-05-30 5:30 p.m., Tom Tromey wrote: > When "common" becomes a library, linking will cause a symbol clash, > because "xmalloc" and some related symbols are defined in that > library, libiberty, and readline. > > To work around this problem, this patch moves the clashing symbols to > a new file, which is then compiled separately for both gdb and > gdbserver. Hmm how does this work currently? We have an xmalloc symbols both in common/common-utils.o and ../libiberty/libiberty.a, why doesn't it clash? Simon