node/lib/metasm/metasm/exe_format/coff_encode.rb
def encode(target='exe', want_relocs=true)
		@encoded = EncodedData.new
		label_at(@encoded, 0, 'coff_start')
		pre_encode_header(target, want_relocs)
		autoimport
		encode_exports if export
		encode_imports if imports
		encode_resource if resource
		encode_tls if tls
		create_relocation_tables if want_relocs
		encode_relocs if relocations
		encode_header
		encode_sections_fixup
		@encoded.data
	end
# encode a COFF file, building export/import/reloc tables if needed
# creates the base relocation tables (need for references to IAT not known before)
# defaults to generating relocatable files, eg ALSR-aware
# pass want_relocs=false to avoid the file overhead induced by this
encode a COFF file, building export/import/reloc tables if needed
creates the base relocation tables (need for references to IAT not known before)
defaults to generating relocatable files, eg ALSR-aware
pass want_relocs=false to avoid the file overhead induced by this
encode a COFF file building export / import / reloc tables if needed creates the base relocation tables ( need for references to IAT not known before ) defaults to generating relocatable files eg ALSR - aware pass want_relocs = false to avoid the file overhead induced by this
def encode(target='exe', want_relocs=true)
		@encoded = EncodedData.new
		label_at(@encoded, 0, 'coff_start')
		pre_encode_header(target, want_relocs)
		autoimport
		encode_exports if export
		encode_imports if imports
		encode_resource if resource
		encode_tls if tls
		create_relocation_tables if want_relocs
		encode_relocs if relocations
		encode_header
		encode_sections_fixup
		@encoded.data
	end
def encode ( target = 'exe' , want_relocs = true ) @encoded = EncodedData . new label_at ( @encoded , 0 , 'coff_start' ) pre_encode_header ( target , want_relocs ) autoimport encode_exports if export encode_imports if imports encode_resource if resource encode_tls if tls create_relocation_tables if want_relocs encode_relocs if relocations encode_header encode_sections_fixup @encoded . data end
encode a COFF file, building export/import/reloc tables if needed
creates the base relocation tables (need for references to IAT not known before)
defaults to generating relocatable files, eg ALSR-aware
pass want_relocs=false to avoid the file overhead induced by this
encode a COFF file building export / import / reloc tables if needed creates the base relocation tables ( need for references to IAT not known before ) defaults to generating relocatable files eg ALSR - aware pass want_relocs = false to avoid the file overhead induced by this
target
want_relocs