The OpenD Programming Language

getsegbyname

Returns the segment with the given segment name.

Returns the segment structure of the given segment in the mach executable it is linked into.

void main()
{
     import core.sys.darwin.mach.getsect;
     assert(getsegbyname("__TEXT"));
}
version(CoreDdoc)
extern (C) nothrow @nogc
getsegbyname
(
const scope char* segname
)

Parameters

segname char*

the name of the segment

Return Value

Type: const(SegmentCommand)*

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

Meta