HomeFreeBSD

crtend: accurately check for the start of .ctors

Description

crtend: accurately check for the start of .ctors

For the hypothetic situation where crtbegin.o is not linked into the
binary, but crtend.o is, which results in the missing starting sentinel
in the ctors array, be careful to not iterate past the start of the
section.

Reviewed by: andrew, dim
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48700

Details

Provenance
kibAuthored on Mon, Jan 27, 8:38 PM
Reviewer
andrew
Differential Revision
D48700: Workaround for crtbegin.o or crtend.o not being included into the link
Parents
rG6ee34bca48a9: crtbegin: accurately check for the end of .dtors
Branches
Unknown
Tags
Unknown