From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by sourceware.org (Postfix) with ESMTPS id C1218385B835 for ; Thu, 9 Apr 2020 17:35:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C1218385B835 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maskray.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emacsray@gmail.com Received: by mail-pj1-f68.google.com with SMTP id l36so1583655pjb.3 for ; Thu, 09 Apr 2020 10:35:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wDncbuoYd2g0FLytLOIHtJPr8tqqOJgMoX9uccoUxcA=; b=ZwNH1SJC/wo/xpWjsJEeXSpZy7ph/MKNyUB64x86ctjfcxaASm1qCoG+84ds+De9HH HGRHnddgNNNJRXQGCH8pVsiH6YM2PR4SuomhgmXOGikXGATCLZEQrcw4hxkVDMjhZ9bR FF0KCqr/d+UfZMJzhF4HeKk+du4a5fgLORQrm3LtG6QWZ6f8NghF2kvZLCxTaD8D+De9 X38mNM0VVSBXkfdux+kiqdSQH9yRy45OJH8QLcAcOfRjoiTiJJ3qork0BznKV8ymx0qs rzoxP3+Ai1Nmr4OzRvnfDI1ONwj58xPB8JYW/B129uC/xTmfqPikVvCq7tdDTBslfZgu Og+w== X-Gm-Message-State: AGi0PuZjVRJA5TN7oUJPRsn15/c7Nfyu+Gg/PBsIFxD+QqQdvaarduBv CAdXQU+HWUOkpJg2T+8eo1doAEt1 X-Google-Smtp-Source: APiQypJivkhRtyBhfnLPcR5a6fQWza2rHZzY9dGOdJQUXWZYhlDuOaaYynhToTcKMHjDwi0stYSZng== X-Received: by 2002:a17:90a:a40d:: with SMTP id y13mr645852pjp.82.1586453742542; Thu, 09 Apr 2020 10:35:42 -0700 (PDT) Received: from localhost ([2601:647:4b01:ae80::51fb]) by smtp.gmail.com with ESMTPSA id 184sm18576782pge.71.2020.04.09.10.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 10:35:41 -0700 (PDT) Date: Thu, 9 Apr 2020 10:35:40 -0700 From: Fangrui Song To: "H.J. Lu" Cc: Alan Modra , Binutils Subject: Re: PING [PATCH] readelf: Consolidate --syms --use-dynamic with --dyn-syms table Message-ID: <20200409173540.x34sfvwrpgu7vfqp@gmail.com> References: <20200312132334.1136925-1-hjl.tools@gmail.com> <20200319125114.GA960957@gmail.com> <1ae6d932-fb2d-680f-0f47-0c5df7aa8eab@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1ae6d932-fb2d-680f-0f47-0c5df7aa8eab@redhat.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 17:35:45 -0000 On 2020-04-09, Nick Clifton via Binutils wrote: >Hi H.J. > >> Can you take a look at >> https://sourceware.org/pipermail/binutils/2020-March/000234.html > >Generally the patch looks fine to me, but ... there appear to be some >linker testsuite regressions for various targets: > > mips-elf: LD REGRESSION: ld-mips-elf/hash2 [and other mips based targets] > > arm-nto: LD REGRESSION: Thumb shared library with ARM [and other arm based targets] > LD REGRESSION: Mixed ARM/Thumb shared library > LD REGRESSION: Mixed ARM/Thumb dynamic application > LD REGRESSION: Mixed ARM/Thumb arch5 dynamic application > >A quick look suggests that these are all due to readelf's output >changing slightly and the tests not expecting the new format. > >Could you take a look and tweak the tests as necessary please ? > >Cheers > Nick > >PS. Hmm, just noticed that you had already patched the ld-mips-elf/hash2 >test, so I am wondering why it is failing. The entry in ld.log looks like >this: > > Executing on host: sh -c {readelf -d -s -D tmpdir/dump > tmpdir/dump.out 2>dump.tmp} /dev/null (timeout = 300) > spawn [open ...] > > extra regexps in ld/testsuite/ld-mips-elf/hash2.d starting with "^ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) __start$" > EOF from tmpdir/dump.out > FAIL: ld-mips-elf/hash2 > >Is it possible that your revision of the original patch now makes this test fail ? > My understanding is that readelf -D --dyn-syms still uses the section header table (inferred from the output: `Symbol table '.dynsym'`, not `from image`) Should -D --dyn-syms decode the dynamic symbol table via DT_SYMTAB as well? As a possible future enhancement, when DT_SYMTAB and SHT_DYNSYM disagree with the location, a warning can be issued. (llvm-readelf >= 10 can print warning: '[[FILE]]': SHT_DYNSYM section header and DT_SYMTAB disagree about the location of the dynamic symbol table llvm-readelf >= 11 will have more diagnostics: warning: '[[FILE]]': hash table nchain (93) differs from symbol count derived from SHT_DYNSYM section header (1) )