From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113667 invoked by alias); 24 Jan 2018 13:23:10 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 113399 invoked by uid 89); 24 Jan 2018 13:23:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:456 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Jan 2018 13:23:09 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C6E3C047B97; Wed, 24 Jan 2018 13:23:08 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 731B27F7FC; Wed, 24 Jan 2018 13:23:07 +0000 (UTC) Date: Wed, 24 Jan 2018 13:23:00 -0000 From: Jan Kratochvil To: Yao Qi Cc: gdb@sourceware.org Subject: Re: [compile] Relocate memcpy Message-ID: <20180124132304.GA15685@host1.jankratochvil.net> References: <868tcne98t.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <868tcne98t.fsf@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-SW-Source: 2018-01/txt/msg00018.txt.bz2 On Wed, 24 Jan 2018 13:23:14 +0100, Yao Qi wrote: > My understanding is some thing patches "bl memcpy" with the address told > by gdb. I don't know the patching is done by libcc1 or something else. gdb/compile/compile-object-load.c contains something like ld.so - it loads object (.o) files and processes their relocations (rather bfd/ does that) to copy them to mmap()ed areas. I was debugging it only on i686+x86_64. Jan