View source code
							
							
						
								Display the source code in dmd/backend/cgobj.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.cgobj
Compiler implementation of the D programming language.
Functions
| Name | Description | 
|---|---|
| 
									addfixup(lr, offset, lcfd, framedatum, targetdatum)
								 | Add a new fixup to the fixup list. Write things out if we overflow the list. | 
| 
									addfixup(lr, offset, lcfd, framedatum, targetdatum)
								 | Add a new fixup to the fixup list. Write things out if we overflow the list. | 
| 
									error()
								 | Insert an index number. | 
| 
									error()
								 | Insert an index number. | 
| 
									getindex(p)
								 | Read index. | 
| 
									getindex(p)
								 | Read index. | 
| 
									getsegment()
								 | Allocate a new segment. Return index for the new segment. | 
| 
									getsegment()
								 | Allocate a new segment. Return index for the new segment. | 
| 
									instypidx(p, index)
								 | Insert a type index number. | 
| 
									instypidx(p, index)
								 | Insert a type index number. | 
| 
									ledata_new(seg, offset)
								 | Open up a new ledata record. | 
| 
									ledata_new(seg, offset)
								 | Open up a new ledata record. | 
| 
									linnum_flush()
								 | Flush any pending line number records. | 
| 
									linnum_flush()
								 | Flush any pending line number records. | 
| 
									linnum_term()
								 | Terminate line numbers. | 
| 
									linnum_term()
								 | Terminate line numbers. | 
| 
									obj_comment(x, string, len)
								 | Embed comment record. | 
| 
									obj_comment(x, string, len)
								 | Embed comment record. | 
| 
									obj_defaultlib()
								 | Put out default library name. | 
| 
									obj_defaultlib()
								 | Put out default library name. | 
| 
									obj_modend()
								 | Output a MODEND record. | 
| 
									obj_modend()
								 | Output a MODEND record. | 
| 
									obj_newfarseg(size, classidx)
								 | Remember where we put a far segment so we can adjust its size later. | 
| 
									obj_newfarseg(size, classidx)
								 | Remember where we put a far segment so we can adjust its size later. | 
| 
									objfixupp(f)
								 | Output the fixups in list fl. | 
| 
									objfixupp(f)
								 | Output the fixups in list fl. | 
| 
									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 | 
| 
									objmodtoseg(modname)
								 | Convert module name to code segment name. | 
| 
									objmodtoseg(modname)
								 | Convert module name to code segment name. | 
| 
									objrecord(rectyp, record, reclen)
								 | Output an object file data record. | 
| 
									objrecord(rectyp, record, reclen)
								 | Output an object file data record. | 
| 
									objsegdef(attr, size, segnamidx, classnamidx)
								 | Put out a segment definition. | 
| 
									objsegdef(attr, size, segnamidx, classnamidx)
								 | Put out a segment definition. | 
| 
									OmfObj_alias(n1, n2)
								 | Output an alias definition record. | 
| 
									OmfObj_alias(n1, n2)
								 | Output an alias definition record. | 
| 
									OmfObj_allowZeroSize()
								 | Do we allow zero sized objects? | 
| 
									OmfObj_allowZeroSize()
								 | Do we allow zero sized objects? | 
| 
									OmfObj_byte(seg, offset, _byte)
								 | Output byte to object file. | 
| 
									OmfObj_byte(seg, offset, _byte)
								 | Output byte to object file. | 
| 
									OmfObj_bytes(seg, offset, nbytes, p)
								 | Output bytes to object file. | 
| 
									OmfObj_bytes(seg, offset, nbytes, p)
								 | Output bytes to object file. | 
| 
									OmfObj_codeseg(name, suffix)
								 | Define a new code segment. | 
| 
									OmfObj_codeseg(name, suffix)
								 | Define a new code segment. | 
| 
									OmfObj_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 Coffset starting offset in cseg | 
| 
									OmfObj_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 Coffset starting offset in cseg | 
| 
									OmfObj_compiler()
								 | Embed compiler version in .obj file. | 
| 
									OmfObj_compiler()
								 | Embed compiler version in .obj file. | 
| 
									OmfObj_data_readonly(p, len, pseg)
								 | Ouput read only data for data. | 
| 
									OmfObj_data_readonly(p, len, pseg)
								 | Ouput read only data for data. | 
| 
									OmfObj_data_start(sdata, datasize, seg)
								 | Update data information about symbol align for output and assign segment if not already specified. | 
| 
									OmfObj_data_start(sdata, datasize, seg)
								 | Update data information about symbol align for output and assign segment if not already specified. | 
| 
									OmfObj_dosseg()
								 | Output DOSSEG coment record. | 
| 
									OmfObj_dosseg()
								 | Output DOSSEG coment record. | 
| 
									OmfObj_ehtables(sfunc, size, ehsym)
								 | Stuff pointer to function in its own segment. Used for static ctor and dtor lists. | 
| 
									OmfObj_ehtables(sfunc, size, ehsym)
								 | Stuff pointer to function in its own segment. Used for static ctor and dtor lists. | 
| 
									OmfObj_exestr(p)
								 | Embed string in executable. | 
| 
									OmfObj_exestr(p)
								 | Embed string in executable. | 
| 
									OmfObj_export_symbol(s, argsize)
								 | Export a function name. | 
| 
									OmfObj_export_symbol(s, argsize)
								 | Export a function name. | 
| 
									OmfObj_external(s)
								 | Output an external definition. | 
| 
									OmfObj_external(s)
								 | Output an external definition. | 
| 
									OmfObj_far16thunk(s)
								 | Generate far16 thunk. | 
| 
									OmfObj_far16thunk(s)
								 | Generate far16 thunk. | 
| 
									OmfObj_fardata(name, size, poffset)
								 | Define a far data segment. | 
| 
									OmfObj_fardata(name, size, poffset)
								 | Define a far data segment. | 
| 
									OmfObj_fltused()
								 | Mark object file as using floating point. | 
| 
									OmfObj_fltused()
								 | Mark object file as using floating point. | 
| 
									OmfObj_func_term(sfunc)
								 | Update function info after codgen | 
| 
									OmfObj_func_term(sfunc)
								 | Update function info after codgen | 
| 
									OmfObj_import(e)
								 | Convert reference to imported name. | 
| 
									OmfObj_import(e)
								 | Convert reference to imported name. | 
| 
									OmfObj_includelib(name)
								 | Output library name. | 
| 
									OmfObj_includelib(name)
								 | Output library name. | 
| 
									OmfObj_init(objbuf, filename, csegname)
								 | Perform initialization that applies to all .obj output files. | 
| 
									OmfObj_init(objbuf, filename, csegname)
								 | Perform initialization that applies to all .obj output files. | 
| 
									OmfObj_initfile(filename, csegname, modname)
								 | Initialize the start of object output for this particular .obj file. | 
| 
									OmfObj_initfile(filename, csegname, modname)
								 | Initialize the start of object output for this particular .obj file. | 
| 
									OmfObj_jmpTableSegment(s)
								 | |
| 
									OmfObj_jmpTableSegment(s)
								 | |
| 
									OmfObj_ledata(seg, offset, data, lcfd, idx1, idx2)
								 | Output word of data. (Two words if segment:offset pair.) | 
| 
									OmfObj_ledata(seg, offset, data, lcfd, idx1, idx2)
								 | Output word of data. (Two words if segment:offset pair.) | 
| 
									OmfObj_lidata(seg, offset, count)
								 | Output an iterated data block of 0s. (uninitialized data only) | 
| 
									OmfObj_lidata(seg, offset, count)
								 | Output an iterated data block of 0s. (uninitialized data only) | 
| 
									OmfObj_linkerdirective(name)
								 | Output linker directive. | 
| 
									OmfObj_linkerdirective(name)
								 | Output linker directive. | 
| 
									OmfObj_linnum(srcpos, seg, offset)
								 | Line number support. | 
| 
									OmfObj_linnum(srcpos, seg, offset)
								 | Line number support. | 
| 
									OmfObj_lzext(s1, s2)
								 | Output a lazy extern record. s1 is the lazy extern, s2 is its default resolution. | 
| 
									OmfObj_lzext(s1, s2)
								 | Output a lazy extern record. s1 is the lazy extern, s2 is its default resolution. | 
| 
									OmfObj_mangle(s, dest)
								 | Mangle a name. | 
| 
									OmfObj_mangle(s, dest)
								 | Mangle a name. | 
| 
									OmfObj_moduleinfo(scc)
								 | Append pointer to ModuleInfo to "FM" segment. The FM segment is bracketed by the empty FMB and FME segments. | 
| 
									OmfObj_moduleinfo(scc)
								 | Append pointer to ModuleInfo to "FM" segment. The FM segment is bracketed by the empty FMB and FME segments. | 
| 
									OmfObj_reftocodeseg(seg, offset, val)
								 | Refer to address that is in the code segment. Only offsets are output, regardless of the memory model. Used to put values in switch address tables. | 
| 
									OmfObj_reftocodeseg(seg, offset, val)
								 | Refer to address that is in the code segment. Only offsets are output, regardless of the memory model. Used to put values in switch address tables. | 
| 
									OmfObj_reftodatseg(seg, offset, val, targetdatum, flags)
								 | Refer to address that is in the data segment. | 
| 
									OmfObj_reftodatseg(seg, offset, val, targetdatum, flags)
								 | Refer to address that is in the data segment. | 
| 
									OmfObj_reftofarseg(seg, offset, val, farseg, flags)
								 | Refer to address that is in a far segment. | 
| 
									OmfObj_reftofarseg(seg, offset, val, farseg, flags)
								 | Refer to address that is in a far segment. | 
| 
									OmfObj_reftoident(seg, offset, s, val, flags)
								 | Refer to an identifier. | 
| 
									OmfObj_reftoident(seg, offset, s, val, flags)
								 | Refer to an identifier. | 
| 
									OmfObj_segment_group(codesize, datasize, cdatasize, udatasize)
								 | Output segment and group definitions. | 
| 
									OmfObj_segment_group(codesize, datasize, cdatasize, udatasize)
								 | Output segment and group definitions. | 
| 
									OmfObj_setcodeseg(seg)
								 | Reset code seg to existing seg. Used after a COMDAT for a function is done. | 
| 
									OmfObj_setcodeseg(seg)
								 | Reset code seg to existing seg. Used after a COMDAT for a function is done. | 
| 
									OmfObj_setModuleCtorDtor(s, isCtor)
								 | Set up function to be called as static constructor on program startup or static destructor on program shutdown. | 
| 
									OmfObj_setModuleCtorDtor(s, isCtor)
								 | Set up function to be called as static constructor on program startup or static destructor on program shutdown. | 
| 
									OmfObj_startaddress(s)
								 | Set start address | 
| 
									OmfObj_startaddress(s)
								 | Set start address | 
| 
									OmfObj_staticctor(s, dtor, seg)
								 | Symbol is the function that calls the static constructors. Put a pointer to it into a special segment that the startup code looks at. | 
| 
									OmfObj_staticctor(s, dtor, seg)
								 | Symbol is the function that calls the static constructors. Put a pointer to it into a special segment that the startup code looks at. | 
| 
									OmfObj_string_literal_segment(sz)
								 | Get segment for readonly string literals. The linker will pool strings in this section. | 
| 
									OmfObj_string_literal_segment(sz)
								 | Get segment for readonly string literals. The linker will pool strings in this section. | 
| 
									OmfObj_sym_cdata(ty, p, len)
								 | Output read only data and generate a symbol for it. | 
| 
									OmfObj_sym_cdata(ty, p, len)
								 | Output read only data and generate a symbol for it. | 
| 
									OmfObj_term(objfilename)
								 | Terminate package. | 
| 
									OmfObj_term(objfilename)
								 | Terminate package. | 
| 
									OmfObj_termfile()
								 | Fixup and terminate object file. | 
| 
									OmfObj_termfile()
								 | Fixup and terminate object file. | 
| 
									OmfObj_theadr(modname)
								 | Output module name record. | 
| 
									OmfObj_theadr(modname)
								 | Output module name record. | 
| 
									OmfObj_tlsseg_bss()
								 | Define segment for Thread Local Storage. | 
| 
									OmfObj_tlsseg_bss()
								 | Define segment for Thread Local Storage. | 
| 
									OmfObj_user(p)
								 | Embed string in obj. | 
| 
									OmfObj_user(p)
								 | Embed string in obj. | 
| 
									OmfObj_wkext(s1, s2)
								 | Output a weak extern record. s1 is the weak extern, s2 is its default resolution. | 
| 
									OmfObj_wkext(s1, s2)
								 | Output a weak extern record. s1 is the weak extern, s2 is its default resolution. | 
| 
									OmfObj_write_byte(pseg, _byte)
								 | Append byte to segment. | 
| 
									OmfObj_write_byte(pseg, _byte)
								 | Append byte to segment. | 
| 
									OmfObj_write_bytes(pseg, nbytes, p)
								 | Append bytes to segment. | 
| 
									OmfObj_write_bytes(pseg, nbytes, p)
								 | Append bytes to segment. | 
| 
									OmfObj_write_long(seg, offset, data, lcfd, idx1, idx2)
								 | Output long word of data. | 
| 
									OmfObj_write_long(seg, offset, data, lcfd, idx1, idx2)
								 | Output long word of data. | 
| 
									OmfObj_write_pointerRef(s, soff)
								 | write a reference to a mutable pointer into the object file | 
| 
									OmfObj_write_pointerRef(s, soff)
								 | write a reference to a mutable pointer into the object file | 
| 
									OmfObj_write_zeros(pseg, count)
								 | Append an iterated data block of 0s. (uninitialized data only) | 
| 
									OmfObj_write_zeros(pseg, count)
								 | Append an iterated data block of 0s. (uninitialized data only) | 
| 
									outextdata()
								 | Output an external definition. | 
| 
									outextdata()
								 | Output an external definition. | 
| 
									outpubdata()
								 | Output a public definition. | 
| 
									outpubdata()
								 | Output a public definition. | 
| 
									SEG_ATTR(A, C, B, P)
								 | For defining segments. | 
| 
									SEG_ATTR(A, C, B, P)
								 | For defining segments. | 
| 
									storelength(length, i)
								 | Output a common block definition. | 
| 
									storelength(length, i)
								 | Output a common block definition. | 
Structs
| Name | Description | 
|---|---|
| 
									FIXUP
								 | Fixup list. | 
| 
									FIXUP
								 | Fixup list. | 
| 
									Objstate
								 | State of object file. | 
| 
									Objstate
								 | State of object file. | 
Manifest constants
| Name | Type | Description | 
|---|---|---|
| CODECLASS | Output header stuff for object files. | |
| CODECLASS | Output header stuff for object files. | |
| LEDATAMAX | Ledata records | |
| LEDATAMAX | Ledata records | |
| LINNUMMAX | Line number support. | |
| LINNUMMAX | Line number support. | |
| ONS_OHD | ||
| ONS_OHD | 
Authors
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.