This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Don't fall back to .text for e_entry
ClosedPublic

Authored by MaskRay on Sep 17 2021, 4:40 PM.

Details

Summary

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.

Diff Detail

Event Timeline

MaskRay created this revision.Sep 17 2021, 4:40 PM
MaskRay requested review of this revision.Sep 17 2021, 4:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 17 2021, 4:40 PM
MaskRay edited the summary of this revision. (Show Details)Sep 17 2021, 4:42 PM

Seems reasonable to me, but should definitely be release-noted.

lld/test/ELF/entry.s
8

Should we be checking this entry address in the other cases too?

MaskRay updated this revision to Diff 373500.Sep 20 2021, 1:00 AM

improve test

jhenderson accepted this revision.Sep 20 2021, 1:09 AM

LGTM, but please wait for someone else too.

This revision is now accepted and ready to land.Sep 20 2021, 1:09 AM
MaskRay updated this revision to Diff 373510.Sep 20 2021, 1:27 AM

add release note

jhenderson added inline comments.Sep 20 2021, 1:45 AM
lld/docs/ReleaseNotes.rst
29

Perhaps add "Instead, a value of 0 will be written."

peter.smith accepted this revision.Sep 20 2021, 2:45 AM

No objections from me. I agree with James that it should be release noted as it is user visible behaviour change.

MaskRay updated this revision to Diff 373622.Sep 20 2021, 9:34 AM
MaskRay marked an inline comment as done.

update release note

This revision was landed with ongoing or failed builds.Sep 20 2021, 9:35 AM
This revision was automatically updated to reflect the committed changes.