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")); } ___

  1. const(section)* getsectbynamefromheader(const scope mach_header* mhp, const scope char* segname, const scope char* sectname)
  2. const(section_64)* getsectbynamefromheader_64(const scope mach_header_64* mhp, const scope char* segname, const scope char* sectname)
    version(CoreDdoc)
    const(section_64)*
    getsectbynamefromheader_64
    (
    const scope mach_header_64* mhp
    ,
    const scope char* segname
    ,
    const scope char* sectname
    )

Parameters

mhp

the mach header to get the section from

segname
Type: char*

the name of the segment

sectname
Type: 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

Suggestion Box / Bug Report