getsectbynamefromheader_64

Returns the section with the given section name.

Returns the section structure of the given section in the given segment in image pointed to by the given mach header.

void main()
{
     import core.sys.darwin.mach.getsect;
     import core.sys.darwin.crt_externs;

     auto mph = _NSGetMachExecuteHeader();
     assert(getsectbynamefromheader(mph, "__TEXT", "__text"));
}
version(CoreDdoc)
extern (C) nothrow @nogc
const(section_64)*
getsectbynamefromheader_64
(
const scope mach_header_64* mhp
,
const scope char* segname
,
const scope char* sectname
)

Parameters

mhp mach_header_64*

the mach header to get the section from

segname char*

the name of the segment

sectname char*

the name of the section

Return Value

Type: const(section_64)*

a pointer to the section structure or null if it doesn't exist

Meta