diff lwlink/lwlink.h @ 236:ce1fdc8d6568

Added ability to add padding after a section when linking. Added the ability for lwlink to automatically append padding bytes to the end of a section (once the section instances are merged). This behaviour is controlled by the link script. See the updated documentation for more information.
author William Astle <lost@l-w.ca>
date Sat, 11 Aug 2012 23:29:57 -0600
parents d389adbcc4ab
children 7de7b14ebaee
line wrap: on
line diff
--- a/lwlink/lwlink.h	Sat Aug 11 15:18:58 2012 -0600
+++ b/lwlink/lwlink.h	Sat Aug 11 23:29:57 2012 -0600
@@ -70,6 +70,9 @@
 	reloc_t *incompletes;	// table of incomplete references
 	
 	fileinfo_t *file;		// the file we are in
+	
+	int aftersize;			// add this many bytes after section on output
+	unsigned char *afterbytes;	// add these bytes after section on output
 } section_t;
 
 struct fileinfo_s
@@ -95,9 +98,20 @@
 	int forceaddr;		// was this force to an address by the link script?
 };
 
+
+typedef struct sectopt_s sectopt_t;
+struct sectopt_s
+{
+	char *name;					// section name
+	int aftersize;				// number of bytes to append to section
+	unsigned char *afterbytes;	// the bytes to store after the section
+	sectopt_t *next;			// next section option
+};
+
 #ifndef __link_c_seen__
 extern struct section_list *sectlist;
 extern int nsects;
+extern sectopt_t *section_opts;
 #endif