[ELF] Don't fall back to .text for e_entry
authorFangrui Song <i@maskray.me>
Mon, 20 Sep 2021 16:35:12 +0000 (09:35 -0700)
committerFangrui Song <i@maskray.me>
Mon, 20 Sep 2021 16:35:12 +0000 (09:35 -0700)
commitd001ab82e410d0c6ccf14be9f507c8aca53abc67
tree00540c813a0be2cc6e72199939524d4683f3d98d
parent8700f2bd36bb9b7d7075ed4dac0aef92b9489237
[ELF] Don't fall back to .text for e_entry

We have the rule to simulate
(https://sourceware.org/binutils/docs/ld/Entry-Point.html),
but the behavior is questionable
(https://sourceware.org/pipermail/binutils/2021-September/117929.html).

gold doesn't fall back to .text.
The behavior is unlikely relied by projects (there is even a warning for
executable links), so let's just delete this fallback path.

Reviewed By: jhenderson, peter.smith

Differential Revision: https://reviews.llvm.org/D110014
lld/ELF/Writer.cpp
lld/docs/ReleaseNotes.rst
lld/test/ELF/basic-ppc.s
lld/test/ELF/basic-ppc64.s
lld/test/ELF/entry.s