comparison 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
comparison
equal deleted inserted replaced
235:e3741cf53e00 236:ce1fdc8d6568
68 symtab_t *exportedsyms; // exported symbols table 68 symtab_t *exportedsyms; // exported symbols table
69 69
70 reloc_t *incompletes; // table of incomplete references 70 reloc_t *incompletes; // table of incomplete references
71 71
72 fileinfo_t *file; // the file we are in 72 fileinfo_t *file; // the file we are in
73
74 int aftersize; // add this many bytes after section on output
75 unsigned char *afterbytes; // add these bytes after section on output
73 } section_t; 76 } section_t;
74 77
75 struct fileinfo_s 78 struct fileinfo_s
76 { 79 {
77 char *filename; 80 char *filename;
93 { 96 {
94 section_t *ptr; // ptr to section structure 97 section_t *ptr; // ptr to section structure
95 int forceaddr; // was this force to an address by the link script? 98 int forceaddr; // was this force to an address by the link script?
96 }; 99 };
97 100
101
102 typedef struct sectopt_s sectopt_t;
103 struct sectopt_s
104 {
105 char *name; // section name
106 int aftersize; // number of bytes to append to section
107 unsigned char *afterbytes; // the bytes to store after the section
108 sectopt_t *next; // next section option
109 };
110
98 #ifndef __link_c_seen__ 111 #ifndef __link_c_seen__
99 extern struct section_list *sectlist; 112 extern struct section_list *sectlist;
100 extern int nsects; 113 extern int nsects;
114 extern sectopt_t *section_opts;
101 #endif 115 #endif
102 116
103 117
104 #ifndef __lwlink_c_seen__ 118 #ifndef __lwlink_c_seen__
105 119