[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Fri Apr 2 13:45:41 CEST 2010


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	10/04/02 13:45:41

Modified files:
	cm3/m3-sys/m3objfile/src/: NTObjFile.m3 

Log message:
	rename functions for clarity, consistency
	
	"Raw" => "ToSection" or "InSection" or "Section"
	non-"Raw" => "ToSegment" or "InSegment" or "Segment"
	"Add" or "Append" => consistently "Append"
	non-"Bytes" => "Integer" (up to 4 bytes, lower bytes first)
	
	AddRaw       => AppendIntegerToSection
	AddRawBytes  => AppendBytesToSection
	Append       => AppendIntegerToSegment
	AppendBytes  => AppendBytesToSegment
	Backup       => BackupInSegment
	BackupRaw    => BackupInSection
	PatchRaw     => PathSection
	Patch        => PatchSegment
	SegToSection => SegmentToSection
	
	The "Backup" functions are relatively new,
	introduced to cleanup the code that produces epilogs.
	
	The "Bytes" functions are relatively new,
	introduced to support appending more than 4 bytes at a time (e.g. longint constants)
	
	SegToSection is new, introduced to combine common code
	
	"Raw" doesn't seem like a good way to distinguish functions.
	
	"Segment" vs. "Section" isn't great either, they
	are similar, but at least they are types in the neighborbood.
	
	I think segment is just an enum that is a shorthand that
	maps to some specific sections.
	
	There are just text and data segments,
	but there are also bss, debug types, debug symbols, reloc section.
	
	I think we are missing a segment and section -- read only data,
	not quite the same as read only code, now that (x86) processors
	have a page protection to disallow execution.
	We shouldn't put our read only data long with our code.
	
	Other targets probably need even more segments/sections such as to
	support position independent code.
	(NT doesn't really have position independent code.)




More information about the M3commit mailing list