View source code
Display the source code in dmd/backend/mscoffobj.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module dmd.backend.mscoffobj

Compiler implementation of the D programming language.

Functions

NameDescription
emitSectionBrace(segname, symname, attr, coffZeroBytes) Put out symbols that define the beginning/end of the .deh_eh section. This gets called if this is the module with "extern (D) main()" in it.
emitSectionBrace(segname, symname, attr, coffZeroBytes) Put out symbols that define the beginning/end of the .deh_eh section. This gets called if this is the module with "extern (D) main()" in it.
MsCoffObj_addrel(seg, offset, targsym, targseg, rtype, val) Add a relocation entry for seg/offset.
MsCoffObj_addrel(seg, offset, targsym, targseg, rtype, val) Add a relocation entry for seg/offset.
MsCoffObj_addScnhdr(scnhdr_name, flags) Add new scnhdr.
MsCoffObj_addScnhdr(scnhdr_name, flags) Add new scnhdr.
MsCoffObj_addstr(strtab, str) Output a string into a string table
MsCoffObj_addstr(strtab, str) Output a string into a string table
MsCoffObj_alias(n1, n2) Output an alias definition record.
MsCoffObj_alias(n1, n2) Output an alias definition record.
MsCoffObj_allowZeroSize() Do we allow zero sized objects?
MsCoffObj_allowZeroSize() Do we allow zero sized objects?
MsCoffObj_byte(seg, offset, byte_) Output byte_ to object file.
MsCoffObj_byte(seg, offset, byte_) Output byte_ to object file.
MsCoffObj_bytes(seg, offset, nbytes, p) Output bytes to object file.
MsCoffObj_bytes(seg, offset, nbytes, p) Output bytes to object file.
MsCoffObj_codeseg(name, suffix) Define a new code segment.
MsCoffObj_codeseg(name, suffix) Define a new code segment.
MsCoffObj_comdatsize(s, symsize) Setup for Symbol s to go into a COMDAT segment. Output (if s is a function): cseg segment index of new current code segment Offset(cseg) starting offset in cseg
MsCoffObj_comdatsize(s, symsize) Setup for Symbol s to go into a COMDAT segment. Output (if s is a function): cseg segment index of new current code segment Offset(cseg) starting offset in cseg
MsCoffObj_common_block(s, size, count) Output a common block definition.
MsCoffObj_common_block(s, size, count) Output a common block definition.
MsCoffObj_compiler() Embed compiler version in .obj file.
MsCoffObj_compiler() Embed compiler version in .obj file.
MsCoffObj_data_readonly(p, len, pseg) Ouput read only data for data
MsCoffObj_data_readonly(p, len, pseg) Ouput read only data for data
MsCoffObj_data_start(sdata, datasize, seg) Update data information about symbol align for output and assign segment if not already specified.
MsCoffObj_data_start(sdata, datasize, seg) Update data information about symbol align for output and assign segment if not already specified.
MsCoffObj_ehtables(sfunc, size, ehsym) Stuff the following data (instance of struct FuncTable) in a separate segment: pointer to function pointer to ehsym length of function
MsCoffObj_ehtables(sfunc, size, ehsym) Stuff the following data (instance of struct FuncTable) in a separate segment: pointer to function pointer to ehsym length of function
MsCoffObj_exestr(p) Embed string in executable.
MsCoffObj_exestr(p) Embed string in executable.
MsCoffObj_export_symbol(s, argsize) Export a function name.
MsCoffObj_export_symbol(s, argsize) Export a function name.
MsCoffObj_external(s) Output an external for existing symbol.
MsCoffObj_external(s) Output an external for existing symbol.
MsCoffObj_external_def(name) Output an external symbol for name.
MsCoffObj_external_def(name) Output an external symbol for name.
MsCoffObj_far16thunk(s) Generate far16 thunk.
MsCoffObj_far16thunk(s) Generate far16 thunk.
MsCoffObj_fltused() Mark object file as using floating point.
MsCoffObj_fltused() Mark object file as using floating point.
MsCoffObj_func_start(sfunc) Update function info before codgen
MsCoffObj_func_start(sfunc) Update function info before codgen
MsCoffObj_func_term(sfunc) Update function info after codgen
MsCoffObj_func_term(sfunc) Update function info after codgen
MsCoffObj_getsegment(sectname, flags) Get segment, which may already exist.
MsCoffObj_getsegment(sectname, flags) Get segment, which may already exist.
MsCoffObj_getsegment2(shtidx) Create a new segment corresponding to an existing scnhdr index shtidx
MsCoffObj_getsegment2(shtidx) Create a new segment corresponding to an existing scnhdr index shtidx
MsCoffObj_includelib(name) Output library name.
MsCoffObj_includelib(name) Output library name.
MsCoffObj_init(objbuf, filename, csegname) Start a .obj file. Called before any other obj_xxx routines. One source file can generate multiple .obj files.
MsCoffObj_init(objbuf, filename, csegname) Start a .obj file. Called before any other obj_xxx routines. One source file can generate multiple .obj files.
MsCoffObj_initfile(filename, csegname, modname) Start a module within a .obj file. There can be multiple modules within a single .obj file.
MsCoffObj_initfile(filename, csegname, modname) Start a module within a .obj file. There can be multiple modules within a single .obj file.
MsCoffObj_jmpTableSegment(s)
MsCoffObj_jmpTableSegment(s)
MsCoffObj_lidata(seg, offset, count) Output an iterated data block of 0s.
MsCoffObj_lidata(seg, offset, count) Output an iterated data block of 0s.
MsCoffObj_linkerdirective(directive) Output linker directive name.
MsCoffObj_linkerdirective(directive) Output linker directive name.
MsCoffObj_linnum(srcpos, seg, offset) Line number support.
MsCoffObj_linnum(srcpos, seg, offset) Line number support.
MsCoffObj_moduleinfo(scc) Stuff pointer to ModuleInfo in its own segment.
MsCoffObj_moduleinfo(scc) Stuff pointer to ModuleInfo in its own segment.
MsCoffObj_pubdef(seg, s, offset) Output a public definition.
MsCoffObj_pubdef(seg, s, offset) Output a public definition.
MsCoffObj_reftocodeseg(seg, offset, val) Refer to address that is in the current function code (funcsym_p). Only offsets are output, regardless of the memory model. Used to put values in switch address tables.
MsCoffObj_reftocodeseg(seg, offset, val) Refer to address that is in the current function code (funcsym_p). Only offsets are output, regardless of the memory model. Used to put values in switch address tables.
MsCoffObj_reftodatseg(seg, offset, val, targetdatum, flags) Refer to address that is in the data segment.
MsCoffObj_reftodatseg(seg, offset, val, targetdatum, flags) Refer to address that is in the data segment.
MsCoffObj_reftoident(seg, offset, s, val, flags) Refer to an identifier.
MsCoffObj_reftoident(seg, offset, s, val, flags) Refer to an identifier.
MsCoffObj_seg_pdata() Return segment indices for .pdata and .xdata sections
MsCoffObj_seg_pdata() Return segment indices for .pdata and .xdata sections
MsCoffObj_setcodeseg(seg) Reset code seg to existing seg. Used after a COMDAT for a function is done.
MsCoffObj_setcodeseg(seg) Reset code seg to existing seg. Used after a COMDAT for a function is done.
MsCoffObj_setModuleCtorDtor(sfunc, isCtor) Stuff pointer to function in its own segment. Used for static ctor and dtor lists.
MsCoffObj_setModuleCtorDtor(sfunc, isCtor) Stuff pointer to function in its own segment. Used for static ctor and dtor lists.
MsCoffObj_startaddress(s) Set start address
MsCoffObj_startaddress(s) Set start address
MsCoffObj_staticctor(s, dtor, none) Symbol is the function that calls the static constructors. Put a pointer to it into a special segment that the startup code looks at.
MsCoffObj_staticctor(s, dtor, none) Symbol is the function that calls the static constructors. Put a pointer to it into a special segment that the startup code looks at.
MsCoffObj_staticdtor(s) Symbol is the function that calls the static destructors. Put a pointer to it into a special segment that the exit code looks at.
MsCoffObj_staticdtor(s) Symbol is the function that calls the static destructors. Put a pointer to it into a special segment that the exit code looks at.
MsCoffObj_string_literal_segment(sz) Get segment for readonly string literals. The linker will pool strings in this section.
MsCoffObj_string_literal_segment(sz) Get segment for readonly string literals. The linker will pool strings in this section.
MsCoffObj_sym_cdata(ty, p, len) Output read only data and generate a symbol for it.
MsCoffObj_sym_cdata(ty, p, len) Output read only data and generate a symbol for it.
MsCoffObj_term(objfilename) Terminate package.
MsCoffObj_term(objfilename) Terminate package.
MsCoffObj_termfile() Fixup and terminate object file.
MsCoffObj_termfile() Fixup and terminate object file.
MsCoffObj_tlsseg() Define segments for Thread Local Storage.
MsCoffObj_tlsseg() Define segments for Thread Local Storage.
MsCoffObj_tlsseg_bss() Define segments for Thread Local Storage.
MsCoffObj_tlsseg_bss() Define segments for Thread Local Storage.
MsCoffObj_user(p) Embed string in obj.
MsCoffObj_user(p) Embed string in obj.
MsCoffObj_wkext(s1, s2) Output a weak extern record.
MsCoffObj_wkext(s1, s2) Output a weak extern record.
MsCoffObj_write_byte(pseg, byte_) Append byte to segment.
MsCoffObj_write_byte(pseg, byte_) Append byte to segment.
MsCoffObj_write_bytes(pseg, nbytes, p) Append bytes to segment.
MsCoffObj_write_bytes(pseg, nbytes, p) Append bytes to segment.
MsCoffObj_write_pointerRef(s, soff) write a reference to a mutable pointer into the object file
MsCoffObj_write_pointerRef(s, soff) write a reference to a mutable pointer into the object file
MsCoffObj_write_zeros(pseg, count) Append an iterated data block of 0s. (uninitialized data only)
MsCoffObj_write_zeros(pseg, count) Append an iterated data block of 0s. (uninitialized data only)
obj_filename(modname) Output file name record.
obj_filename(modname) Output file name record.
obj_mangle2(s, dest) Mangle a name.
obj_mangle2(s, dest) Mangle a name.
objflush_pointerRef(s, soff) flush a single pointer reference saved by write_pointerRef to the object file
objflush_pointerRef(s, soff) flush a single pointer reference saved by write_pointerRef to the object file
objflush_pointerRefs() flush all pointer references saved by write_pointerRef to the object file
objflush_pointerRefs() flush all pointer references saved by write_pointerRef to the object file
patchAddr(seg, offset) Patch pseg/offset by adding in the vmaddr difference from pseg/offset to start of seg.
patchAddr(seg, offset) Patch pseg/offset by adding in the vmaddr difference from pseg/offset to start of seg.
rel_fp(e1, e2) Sort the relocation entry buffer.
rel_fp(e1, e2) Sort the relocation entry buffer.
ScnhdrTab()
ScnhdrTab()
seg_data_isCode(sd) Returns !=0 if this segment is a code segment.
seg_data_isCode(sd) Returns !=0 if this segment is a code segment.
syment_set_name(sym, name) Build syment[], the array of symbols. Store them in syment_buf.
syment_set_name(sym, name) Build syment[], the array of symbols. Store them in syment_buf.

Manifest constants

NameTypeDescription
SCNHDR_TAB_INC
SCNHDR_TAB_INC
SCNHDR_TAB_INITSIZE
SCNHDR_TAB_INITSIZE
SYM_TAB_INC
SYM_TAB_INC
SYM_TAB_INIT
SYM_TAB_INIT

Global variables

NameTypeDescription
extdef IDXSTR
extdef IDXSTR
floatused int
floatused int
indirectsymbuf2 Outbuffer*
indirectsymbuf2 Outbuffer*
jumpTableSeg int
jumpTableSeg int
pointersSeg int
pointersSeg int
ptrref_buf Outbuffer*
ptrref_buf Outbuffer*
scnhdr_cnt int
scnhdr_cnt int
ScnhdrBuf Outbuffer*
ScnhdrBuf Outbuffer*
seg_count int
seg_count int
seg_max int
seg_max int
seg_tlsseg segidx_t
seg_tlsseg segidx_t
seg_tlsseg_bss segidx_t
seg_tlsseg_bss segidx_t
segidx_debugS segidx_t
segidx_debugS segidx_t
segidx_drectve segidx_t
segidx_drectve segidx_t
segidx_pdata segidx_t
segidx_pdata segidx_t
segidx_xdata segidx_t
segidx_xdata segidx_t
string_table Outbuffer*
string_table Outbuffer*
symbuf Outbuffer*
symbuf Outbuffer*
syment_buf Outbuffer*
syment_buf Outbuffer*

Authors

Walter Bright

License

Boost License 1.0