[PATCH] D44422: [ELF] - Never create .gnu_hash with NBuckets == 0.

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 13 08:18:29 PDT 2018


peter.smith added a comment.

I think that this is the simplest change that will pass through Bionic loaders check. The other possibility I thought of which might be a bit more honest is to add one of the symbols to the table even if it were a reference, that would minimise the risk of some other tool from complaining about hash table structure problems.

Unfortunately the bionic loader doesn't look like it will accept an executable without at least one of the ELF hash or GNU hash sections being present (and if present having nbuckets being non 0). I've got it on my list of things to do to raise a defect on the loader as a hash table should be an optimisation.


https://reviews.llvm.org/D44422





More information about the llvm-commits mailing list