View source code
Display the source code in dmd/backend/machobj.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.machobj

Compiler implementation of the D programming language.

Functions

NameDescription
dwarf_eh_frame_fixup(dfseg, offset, s, val, fdesym) Generate LSDA and PC_Begin fixups in the _eh_frame segment encoded as DW_EH_PE_pcrel|ptr. 64 bits LSDA [0] address x0071 symbolnum 6 pcrel 0 length 3 extern 1 type 5 RELOC_SUBTRACTOR _Z3foov.eh [1] address x0071 symbolnum 1 pcrel 0 length 3 extern 1 type 0 RELOC_UNSIGNED GCC_except_table2
dwarf_eh_frame_fixup(dfseg, offset, s, val, fdesym) Generate LSDA and PC_Begin fixups in the _eh_frame segment encoded as DW_EH_PE_pcrel|ptr. 64 bits LSDA [0] address x0071 symbolnum 6 pcrel 0 length 3 extern 1 type 5 RELOC_SUBTRACTOR _Z3foov.eh [1] address x0071 symbolnum 1 pcrel 0 length 3 extern 1 type 0 RELOC_UNSIGNED GCC_except_table2
dwarf_reftoident(seg, offset, s, val) Generate fixup specific to .eh_frame and .gcc_except_table sections.
dwarf_reftoident(seg, offset, s, val) Generate fixup specific to .eh_frame and .gcc_except_table sections.
elf_addmangled(s) Output a mangled string into the symbol string table
elf_addmangled(s) Output a mangled string into the symbol string table
elf_align(size, foffset) Write to the object file
elf_align(size, foffset) Write to the object file
elf_findstr(strtab, str, suffix) Find a string in a string table
elf_findstr(strtab, str, suffix) Find a string in a string table
mach_numbersyms() Number symbols so they are ordered as locals, public and then extern/comdef
mach_numbersyms() Number symbols so they are ordered as locals, public and then extern/comdef
Obj_addrel(seg, offset, targsym, targseg, rtype, val) Add a relocation entry for seg/offset.
Obj_addrel(seg, offset, targsym, targseg, rtype, val) Add a relocation entry for seg/offset.
Obj_addstr(strtab, str) Output a string into a string table
Obj_addstr(strtab, str) Output a string into a string table
Obj_alias(n1, n2) Output an alias definition record.
Obj_alias(n1, n2) Output an alias definition record.
Obj_allowZeroSize() Do we allow zero sized objects?
Obj_allowZeroSize() Do we allow zero sized objects?
Obj_byte(seg, offset, byte_) Output byte to object file.
Obj_byte(seg, offset, byte_) Output byte to object file.
Obj_bytes(seg, offset, nbytes, p) Output bytes to object file.
Obj_bytes(seg, offset, nbytes, p) Output bytes to object file.
Obj_codeseg(name, suffix) Define a new code segment.
Obj_codeseg(name, suffix) Define a new code segment.
Obj_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
Obj_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
Obj_common_block(s, size, count) Output a common block definition.
Obj_common_block(s, size, count) Output a common block definition.
Obj_compiler() Embed compiler version in .obj file.
Obj_compiler() Embed compiler version in .obj file.
Obj_data_readonly(p, len, pseg) Ouput read only data for data
Obj_data_readonly(p, len, pseg) Ouput read only data for data
Obj_data_start(sdata, datasize, seg) Update data information about symbol align for output and assign segment if not already specified.
Obj_data_start(sdata, datasize, seg) Update data information about symbol align for output and assign segment if not already specified.
Obj_ehsections() Put out symbols that define the beginning/end of the .deh_eh section. This gets called if this is the module with "main()" in it.
Obj_ehsections() Put out symbols that define the beginning/end of the .deh_eh section. This gets called if this is the module with "main()" in it.
Obj_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
Obj_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
Obj_exestr(p) Embed string in executable.
Obj_exestr(p) Embed string in executable.
Obj_export_symbol(s, argsize) Export a function name.
Obj_export_symbol(s, argsize) Export a function name.
Obj_external(s) Output an external for existing symbol.
Obj_external(s) Output an external for existing symbol.
Obj_external_def(name) Output an external symbol for name.
Obj_external_def(name) Output an external symbol for name.
Obj_far16thunk(s) Generate far16 thunk.
Obj_far16thunk(s) Generate far16 thunk.
obj_filename(modname) Output file name record.
obj_filename(modname) Output file name record.
Obj_fltused() Mark object file as using floating point.
Obj_fltused() Mark object file as using floating point.
Obj_func_start(sfunc) Update function info before codgen
Obj_func_start(sfunc) Update function info before codgen
Obj_func_term(sfunc) Update function info after codgen
Obj_func_term(sfunc) Update function info after codgen
Obj_getsegment(sectname, segname, align_, flags) Get segment.
Obj_getsegment(sectname, segname, align_, flags) Get segment.
Obj_gotref(s)
Obj_gotref(s)
Obj_includelib(name) Output library name.
Obj_includelib(name) Output library name.
Obj_init(objbuf, filename, csegname) Perform initialization that applies to all .o output files. Called before any other obj_xxx routines
Obj_init(objbuf, filename, csegname) Perform initialization that applies to all .o output files. Called before any other obj_xxx routines
Obj_initfile(filename, csegname, modname) Initialize the start of object output for this particular .o file.
Obj_initfile(filename, csegname, modname) Initialize the start of object output for this particular .o file.
Obj_jmpTableSegment(s)
Obj_jmpTableSegment(s)
Obj_lidata(seg, offset, count) Output an iterated data block of 0s.
Obj_lidata(seg, offset, count) Output an iterated data block of 0s.
Obj_linkerdirective(name) Output linker directive.
Obj_linkerdirective(name) Output linker directive.
Obj_linnum(srcpos, seg, offset) Line number support.
Obj_linnum(srcpos, seg, offset) Line number support.
obj_mangle2(s, dest) Mangle a name.
obj_mangle2(s, dest) Mangle a name.
Obj_moduleinfo(scc) Stuff pointer to ModuleInfo in its own segment.
Obj_moduleinfo(scc) Stuff pointer to ModuleInfo in its own segment.
Obj_pubdefsize(seg, s, offset, symsize) Output a public definition.
Obj_pubdefsize(seg, s, offset, symsize) Output a public definition.
Obj_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.
Obj_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.
Obj_reftodatseg(seg, offset, val, targetdatum, flags) Refer to address that is in the data segment.
Obj_reftodatseg(seg, offset, val, targetdatum, flags) Refer to address that is in the data segment.
Obj_reftoident(seg, offset, s, val, flags) Refer to an identifier.
Obj_reftoident(seg, offset, s, val, flags) Refer to an identifier.
Obj_setcodeseg(seg) Reset code seg to existing seg. Used after a COMDAT for a function is done.
Obj_setcodeseg(seg) Reset code seg to existing seg. Used after a COMDAT for a function is done.
Obj_setModuleCtorDtor(sfunc, isCtor) Stuff pointer to function in its own segment. Used for static ctor and dtor lists.
Obj_setModuleCtorDtor(sfunc, isCtor) Stuff pointer to function in its own segment. Used for static ctor and dtor lists.
Obj_startaddress(s) Set start address
Obj_startaddress(s) Set start address
Obj_staticctor(s, , ) Symbol is the function that calls the static constructors. Put a pointer to it into a special segment that the startup code looks at.
Obj_staticctor(s, , ) Symbol is the function that calls the static constructors. Put a pointer to it into a special segment that the startup code looks at.
Obj_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.
Obj_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.
Obj_string_literal_segment(sz) Get segment for readonly string literals. The linker will pool strings in this section.
Obj_string_literal_segment(sz) Get segment for readonly string literals. The linker will pool strings in this section.
Obj_sym_cdata(ty, p, len) Ouput read only data and generate a symbol for it.
Obj_sym_cdata(ty, p, len) Ouput read only data and generate a symbol for it.
Obj_term(objfilename) Terminate package.
Obj_term(objfilename) Terminate package.
Obj_termfile() Fixup and terminate object file.
Obj_termfile() Fixup and terminate object file.
Obj_tlsseg() Define segments for Thread Local Storage for 32bit.
Obj_tlsseg() Define segments for Thread Local Storage for 32bit.
Obj_tlsseg_bss() Define segments for Thread Local Storage.
Obj_tlsseg_bss() Define segments for Thread Local Storage.
Obj_tlsseg_data() Define segments for Thread Local Storage data.
Obj_tlsseg_data() Define segments for Thread Local Storage data.
Obj_tlv_bootstrap() Returns the symbol for the _tlv_bootstrap function.
Obj_tlv_bootstrap() Returns the symbol for the _tlv_bootstrap function.
Obj_user(p) Embed string in obj.
Obj_user(p) Embed string in obj.
Obj_wkext(s1, s2) Output a weak extern record.
Obj_wkext(s1, s2) Output a weak extern record.
Obj_write_byte(pseg, byte_) Append byte to segment.
Obj_write_byte(pseg, byte_) Append byte to segment.
Obj_write_bytes(pseg, nbytes, p) Append bytes to segment.
Obj_write_bytes(pseg, nbytes, p) Append bytes to segment.
Obj_write_zeros(pseg, count) Append an iterated data block of 0s. (uninitialized data only)
Obj_write_zeros(pseg, count) Append an iterated data block of 0s. (uninitialized data only)
objfile_delete() Close and delete .OBJ file.
objfile_delete() Close and delete .OBJ file.
objfile_term() Terminate.
objfile_term() Terminate.
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.
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.

Global variables

NameTypeDescription
GOTsym Symbol*
GOTsym Symbol*
seg_tlsseg int Section index for the _thread_vars/_tls_data section.
seg_tlsseg int Section index for the _thread_vars/_tls_data section.
seg_tlsseg_bss int Section index for the _thread_bss section.
seg_tlsseg_bss int Section index for the _thread_bss section.
seg_tlsseg_data int Section index for the _thread_data section.
seg_tlsseg_data int Section index for the _thread_data section.

Authors

Walter Bright

License

Boost License 1.0