From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 9D3313858C51 for ; Mon, 21 Mar 2022 13:45:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D3313858C51 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 73D961EDF0; Mon, 21 Mar 2022 09:44:58 -0400 (EDT) Message-ID: Date: Mon, 21 Mar 2022 09:44:57 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 1/2] Add lld(linker) specific option. Content-Language: tl To: "Balasubrmanian, Vignesh" , "gdb-patches@sourceware.org" Cc: "George, Jini Susan" , "Kumar N, Bhuvanendra" References: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3639.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2022 13:45:01 -0000 On 2022-03-21 08:15, Balasubrmanian, Vignesh via Gdb-patches wrote: > > Please review the attached patch. > > LLD doesn't have the option "-Ttext-segment" but "--image-base". > So first try using "-Ttext-segment". If it fails, try the lld option "--image-base" before failing. > > Thanks, > vigneshbalu > > Hi, The approach looks ok to me. Grepping for "text-segment", I see three other tests using -Ttext-segment, are we going to need to fix those up too? - gdb.base/execl-update-breakpoints.exp - gdb.arch/arm-bl-branch-dest.exp - gdb.threads/step-over-exec.exp If so, it would be interesting to make this an option to gdb_compile, instead of specifying a linker-specific flag. For example, you'd use: set options [list \ additional_flags=-DFUNCTION_NAME=[format "jit_function_%04d" $i] \ text_segment=$addr] and text_segment would be recognized by gdb_compile and the complexity would be hidden there. Can you mention (here and in the commit message) the full "make check" line you use to test this? Simon