info.asm_source = asm_source;
info.dbgfmt_dwarf2 = dbgfmt_dwarf2;
info.debug_line = yasm_object_get_general(dbgfmt_dwarf2->object,
- ".debug_line", 0, 4, 0, 0, &new,
+ ".debug_line", 0, 1, 0, 0, &new,
0);
- yasm_section_set_align(info.debug_line, 0, 0);
last = yasm_section_bcs_last(info.debug_line);
/* header */
align = 16;
}
iscode = 1;
- } else if (strcmp(sectname, ".rdata") == 0) {
+ } else if (strcmp(sectname, ".rdata") == 0
+ || strncmp(sectname, ".rodata", 7) == 0) {
flags = COFF_STYP_DATA;
if (objfmt_coff->win32) {
flags |= COFF_STYP_READ;
flags = COFF_STYP_INFO;
if (objfmt_coff->win32)
flags |= COFF_STYP_DISCARD | COFF_STYP_READ;
+ } else if (yasm__strncasecmp(sectname, ".debug", 6)==0) {
+ flags = COFF_STYP_DATA;
+ if (objfmt_coff->win32)
+ flags |= COFF_STYP_DISCARD|COFF_STYP_READ;
+ align = 1;
} else {
/* Default to code */
flags = COFF_STYP_TEXT;
/* GAS-style flags */
int alloc = 0, load = 0, readonly = 0, code = 0, data = 0;
int shared = 0;
+ iscode = 0;
for (i=4; i<strlen(vp->val); i++) {
switch (vp->val[i]) {
case 'a':
flags = COFF_STYP_TEXT;
if (objfmt_coff->win32)
flags |= COFF_STYP_EXECUTE | COFF_STYP_READ;
+ iscode = 1;
} else if (data) {
flags = COFF_STYP_DATA;
if (objfmt_coff->win32)
+-:37: warning: Standard COFF does not support read-only data sections
+-:6284: warning: Standard COFF does not support read-only data sections
+-:6527: warning: Standard COFF does not support read-only data sections
+-:6540: warning: Standard COFF does not support read-only data sections
+-:6549: warning: Standard COFF does not support read-only data sections
+-:6559: warning: Standard COFF does not support read-only data sections
+-:6562: warning: Standard COFF does not support read-only data sections
+-:6629: warning: Standard COFF does not support read-only data sections
+-:7499: warning: Standard COFF does not support read-only data sections
+-:7518: warning: Standard COFF does not support read-only data sections
+-:7991: warning: Standard COFF does not support read-only data sections
+-:9105: warning: Standard COFF does not support read-only data sections
+-:9121: warning: Standard COFF does not support read-only data sections
+-:9143: warning: Standard COFF does not support read-only data sections
+-:9298: warning: Standard COFF does not support read-only data sections
+-:9368: warning: Standard COFF does not support read-only data sections
+-:9511: warning: Standard COFF does not support read-only data sections
+-:9596: warning: Standard COFF does not support read-only data sections
+-:9661: warning: Standard COFF does not support read-only data sections
+-:9741: warning: Standard COFF does not support read-only data sections
+-:9810: warning: Standard COFF does not support read-only data sections
+-:9879: warning: Standard COFF does not support read-only data sections
+-:9945: warning: Standard COFF does not support read-only data sections
+-:10005: warning: Standard COFF does not support read-only data sections
+-:10069: warning: Standard COFF does not support read-only data sections
+-:10139: warning: Standard COFF does not support read-only data sections
+-:10208: warning: Standard COFF does not support read-only data sections
+-:10270: warning: Standard COFF does not support read-only data sections
+-:10935: warning: Standard COFF does not support read-only data sections
+-:11679: warning: Standard COFF does not support read-only data sections
+-:11848: warning: Standard COFF does not support read-only data sections
+-:12534: warning: Standard COFF does not support read-only data sections
+-:14533: warning: Standard COFF does not support read-only data sections
+-:15942: warning: Standard COFF does not support read-only data sections
+-:18092: warning: Standard COFF does not support read-only data sections
+-:18170: warning: Standard COFF does not support read-only data sections
+-:18580: warning: Standard COFF does not support read-only data sections
+-:19769: warning: Standard COFF does not support read-only data sections
+-:19878: warning: Standard COFF does not support read-only data sections
+-:21893: warning: Standard COFF does not support read-only data sections
+-:24311: warning: Standard COFF does not support read-only data sections
+-:24465: warning: Standard COFF does not support read-only data sections
+-:25481: warning: Standard COFF does not support read-only data sections
+-:25614: warning: Standard COFF does not support read-only data sections