[PATCH] D76081: [Object] object::ELFObjectFile::dynamic_symbol_begin(): skip symbol index 0

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 08:39:03 PDT 2020


Higuoxing added a comment.

In D76081#1957298 <https://reviews.llvm.org/D76081#1957298>, @grimar wrote:

> In D76081#1947951 <https://reviews.llvm.org/D76081#1947951>, @Higuoxing wrote:
>
> > Hi @grimar, the build log of this patch shows that we actually have a checker that complains `sh_size` isn't a multiple of `sh_entsize` (llvm/include/Object/ELF.h: Line 401). But I have no idea why it wasn't triggered on my machine. I use a release build because I do not have enough memory for debug build ...
>
>
> I've missed this question/thread somehow, sorry.
>
> In D76081#1949253 <https://reviews.llvm.org/D76081#1949253>, @jhenderson wrote:
>
> > In D76081#1948391 <https://reviews.llvm.org/D76081#1948391>, @Higuoxing wrote:
> >
> > > Ahhhh, After enable `-DLLVM_ENABLE_ASSERTIONS=ON`,
> > >
> > > there's an error: `section [index 2] has an invalid sh_size (33) which is not a multiple of its sh_entsize (16)Stack dump`. But this error won't show up in a release build. I think we should at least warn user about this?
> >
> >
> > Where abouts does this message come from?
>
>
>
>
>   I do not think that `LLVM_ENABLE_ASSERTIONS` should affect on whether we print or not something like this message..
>   
>
> @Higuoxing, if you still have problems with it, please clarify how to reproduce the misbehavior you observe (e.g.. which yaml you use).


Ah, thank you @grimar, this should be fixed in D77289 <https://reviews.llvm.org/D77289>. But the error was consumed, we still need to do some improvements to warn user about it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76081/new/

https://reviews.llvm.org/D76081





More information about the llvm-commits mailing list