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
mscoff_seg_data_isCode(sd) Returns !=0 if this segment is a code segment.
MsCoffObj_addrel(seg, offset, targsym, targseg, rtype, val) Add a relocation entry for seg/offset.
MsCoffObj_addScnhdr(scnhdr_name, flags) Add new scnhdr.
MsCoffObj_addstr(strtab, str) Output a string into a string table
MsCoffObj_alias(n1, n2) Output an alias definition record.
MsCoffObj_allowZeroSize() Do we allow zero sized objects?
MsCoffObj_byte(seg, offset, byte_) Output byte_ to object file.
MsCoffObj_bytes(seg, offset, nbytes, p) Output bytes to object file.
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_common_block(s, size, count) Output a common block definition.
MsCoffObj_compiler(p) Embed compiler version in .obj file.
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_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_export_symbol(s, argsize) Export a function name.
MsCoffObj_external(s) Output an external for existing symbol.
MsCoffObj_external_def(name) Output an external symbol for name.
MsCoffObj_far16thunk(s) Generate far16 thunk.
MsCoffObj_filename(modname) Output file name record.
MsCoffObj_fltused() Mark object file as using floating point.
MsCoffObj_func_start(sfunc) Update function info before codgen
MsCoffObj_func_term(sfunc) Update function info after codgen
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_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_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_lidata(seg, offset, count) Output an iterated data block of 0s.
MsCoffObj_linkerdirective(directive) Output linker directive name.
MsCoffObj_linnum(srcpos, seg, offset) Line number support.
MsCoffObj_moduleinfo(scc) Stuff pointer to ModuleInfo in its own segment.
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_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_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_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_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_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_term(objfilename) Terminate package.
MsCoffObj_termfile() Fixup and terminate object file.
MsCoffObj_tlsseg() Define segments for Thread Local Storage.
MsCoffObj_tlsseg_bss() Define segments for Thread Local Storage.
MsCoffObj_user(p) Embed string in obj.
MsCoffObj_wkext(s1, s2) Output a weak extern record.
MsCoffObj_write_byte(pseg, byte_) Append byte to segment.
MsCoffObj_write_bytes(pseg, a) Append bytes to segment.
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)
write_importTableRef(seg, soff, imp) write a reference to the import table into the object file

Global variables

NameTypeDescription
ScnhdrBuf OutBuffer*

Authors

Walter Bright

License

Boost License 1.0