From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id A87F73858CDA for ; Wed, 26 Apr 2023 05:59:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A87F73858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-51b0f9d7d70so6762408a12.1 for ; Tue, 25 Apr 2023 22:59:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682488793; x=1685080793; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=BpO/He4fQeJS8nVy/WjDMdM5OFLFFVKMGclJ1p+mLDI=; b=iKBA9QKXRVqATYktaSnefisSSuHEU+to5K5lJsWX9NKFg1vmTBtEgmWlI/JskCfRNb KUBgEr7C7VvxC6oiaU/Va2hS36m4V/KyHHTp27rCiqIOEgY7nzfeXHvUDQWKfxMwjJZN BXDTcGAmkSxGe07bDOxSHXeWo1n9i8oa7XBghcOEbi78XNuKPUnFhrR69AGVBurGHnrs UnWh8ctnoKQeEixWJC7+ge8owPYnXuwHzcA3qpsVMoiPKpDSq674bOO4IU4kh3NERf0/ xL5f9/nq2FxdhNUxUI/LubClVUGWyYRG4KsnxZY7cz5i5W3FairOhbvxTucLY95q6tdR JngA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682488793; x=1685080793; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BpO/He4fQeJS8nVy/WjDMdM5OFLFFVKMGclJ1p+mLDI=; b=Qe6xS5UY5cU0SnK6AvEPjhqHLES2HN54e4z8I20n0GCqPSZ7KEvEwMReXdBABAcfJB 7atGVct5vBOCOgGMZSZRY8H/3p8WYY8svj51zpb9SUcYxxsuJxUA2dkSCezyZ4Vygvsv gWtHx32VCAE+paHAp+KU+eATxPj52/34oaPt6XVCyyrvxC1hdxrfOPla19wN+sKuViea n7eyCDpVuOmY8CBYZVzrMi6g2LeaH8wueYf9VpvNwOarg0tWYmG0suwj7JMcD4zMLJUt 8TqPkK/CYtyxLGCgnB3KKQMce6HvMYlpB4L4DAS27BNPcKMQstrK6vaTYeG/Bw6eGGL2 rwWg== X-Gm-Message-State: AAQBX9fetClK4c/XdCJoQhxP9H8F19Ef1bTeFfokd5YzOJszg7soZW0n zNH/4Rv60sivcsYkienWTGWtmUec2g8= X-Google-Smtp-Source: AKy350a5ouvGqH8KwazKR8jC1qk4Ue8Y++Al5iwc+5yws/WWy5Zf1ib1gY6RIN6+9aUAOt13wRZ/xw== X-Received: by 2002:a05:6a21:9982:b0:ec:8f81:e9f7 with SMTP id ve2-20020a056a21998200b000ec8f81e9f7mr27074491pzb.16.1682488792607; Tue, 25 Apr 2023 22:59:52 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:d467:cc06:bf73:8ac4]) by smtp.gmail.com with ESMTPSA id b17-20020a62a111000000b00640f1e4a811sm1678131pff.22.2023.04.25.22.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 22:59:51 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 8179A1142C11; Wed, 26 Apr 2023 15:29:49 +0930 (ACST) Date: Wed, 26 Apr 2023 15:29:49 +0930 From: Alan Modra To: Oleg Tolmatcev Cc: binutils@sourceware.org Subject: Re: [PATCH] optimize handle_COMDAT Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3034.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Apr 25, 2023 at 06:48:11PM +0200, Oleg Tolmatcev via Binutils wrote: > Hello all, > > linking with ld on Windows is currently slow. RPCS3 with BUILD_LLVM=ON > takes 9 minutes to link on my PC and I am talking about the last step > only. I have profiled `ld` with a profiler and optimized the code. > With all the patches the linking only takes 1 min. now. > > This is the first patch of the series of 4 patches. Should I submit > all at once or wait until this one is accepted before I send the next > one? Best get this one accepted first, because it has problems. > diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h You shouldn't be editing bfd-in2.h. It is a generated file, your changes will disappear. > @@ -6822,6 +6822,15 @@ struct bfd > > /* For input BFDs, the build ID, if the object has one. */ > const struct bfd_build_id *build_id; > + htab_t flags_hash; > +}; Also, since flags_hash is specific to PE, it doesn't belong in struct bfd. I think it should instead be put into struct pe_tdata, see libcoff-in.h. > diff --git a/bfd/opncls.c b/bfd/opncls.c Your opncls.c changes don't belong there either. Likely peicode.h is the correct place. -- Alan Modra Australia Development Lab, IBM