[PATCH] D44012: [ELF] - Allow discarding .hash and .gnu.hash from linker script.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 5 01:12:17 PST 2018
grimar added inline comments.
================
Comment at: ELF/LinkerScript.cpp:363-364
+ // It's normal to discard the following sections. We drop the pointer to adjust
+ // the rest code behavior as there were no such sections from the begining.
+ if (S == InX::GnuHashTab)
----------------
ruiu wrote:
> Is that actually common? Could you give me an example?
I am not saying it is common (I am fixing crash here first of all), but there is nothing wrong with that either.
We could disallow discarding of them instead probably, but there are no solid reasons for doing that I think,
as it would be an artificial limitation inconsistent with gnu linkers (they allow doing that).
https://reviews.llvm.org/D44012
More information about the llvm-commits
mailing list