public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Fangrui Song <i@maskray.me>
Cc: Alan Modra <amodra@gmail.com>, Binutils <binutils@sourceware.org>
Subject: Re: PING [PATCH] readelf: Consolidate --syms --use-dynamic with --dyn-syms table
Date: Thu, 9 Apr 2020 10:52:37 -0700	[thread overview]
Message-ID: <CAMe9rOoudFhrYhXKVAFTUCN7_ykmYbw6sh0L=oVvR83rwx5-_Q@mail.gmail.com> (raw)
In-Reply-To: <20200409173540.x34sfvwrpgu7vfqp@gmail.com>

On Thu, Apr 9, 2020 at 10:35 AM Fangrui Song <i@maskray.me> wrote:
>
> 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`)

That is correct.

> Should -D --dyn-syms decode the dynamic symbol table via DT_SYMTAB as well?

It is possible after my patch has landed.

> As a possible future enhancement, when DT_SYMTAB and SHT_DYNSYM disagree
> with the location, a warning can be issued.

Can you open a bug?

> (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)
> )

Thanks.

-- 
H.J.

  reply	other threads:[~2020-04-09 17:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 13:23 [PATCH] readelf: Compute dynamic symbol table size from hash table H.J. Lu
2020-03-19 12:51 ` [PATCH] readelf: Consolidate --syms --use-dynamic with --dyn-syms table H.J. Lu
2020-03-22 12:34   ` H.J. Lu
2020-04-09 13:01     ` PING " H.J. Lu
2020-04-09 14:43       ` Nick Clifton
2020-04-09 17:35         ` Fangrui Song
2020-04-09 17:52           ` H.J. Lu [this message]
2020-04-09 17:51         ` V2 " H.J. Lu
2020-04-14 10:47           ` Nick Clifton
2020-04-15  3:18           ` Alan Modra
2020-04-15 12:04             ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOoudFhrYhXKVAFTUCN7_ykmYbw6sh0L=oVvR83rwx5-_Q@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=i@maskray.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).