mirror of
https://github.com/ksherlock/wdc-utils.git
synced 2025-01-16 18:33:02 +00:00
sec data support.
This commit is contained in:
parent
39dbe71e73
commit
a441f0969b
@ -19,6 +19,12 @@
|
|||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* not documented */
|
||||||
|
#ifndef SEC_DATA
|
||||||
|
#define SEC_DATA 0x80
|
||||||
|
#endif
|
||||||
|
|
||||||
enum class endian {
|
enum class endian {
|
||||||
little = __ORDER_LITTLE_ENDIAN__,
|
little = __ORDER_LITTLE_ENDIAN__,
|
||||||
big = __ORDER_BIG_ENDIAN__,
|
big = __ORDER_BIG_ENDIAN__,
|
||||||
@ -605,7 +611,7 @@ bool dump_obj(const char *name, int fd)
|
|||||||
section = sec;
|
section = sec;
|
||||||
d.set_pc(sections[section].pc);
|
d.set_pc(sections[section].pc);
|
||||||
labels = labels_for_section(symbols, section);
|
labels = labels_for_section(symbols, section);
|
||||||
d.set_code(section == 1 || section > 4);
|
d.set_code((sections[sec].flags & SEC_DATA) == 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -671,6 +677,7 @@ bool dump_obj(const char *name, int fd)
|
|||||||
_(SEC_CONST);
|
_(SEC_CONST);
|
||||||
_(SEC_DIRECT);
|
_(SEC_DIRECT);
|
||||||
_(SEC_NONAME);
|
_(SEC_NONAME);
|
||||||
|
_(SEC_DATA);
|
||||||
fputs("\n", stdout);
|
fputs("\n", stdout);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
1
obj816.h
1
obj816.h
@ -126,6 +126,7 @@ enum { C_NULL, C_AUTO, C_EXT, C_STAT, C_REG, C_EXTDEF, C_ARG,
|
|||||||
#define SEC_CONST 0x0010
|
#define SEC_CONST 0x0010
|
||||||
#define SEC_DIRECT 0x0020
|
#define SEC_DIRECT 0x0020
|
||||||
#define SEC_NONAME 0x0040
|
#define SEC_NONAME 0x0040
|
||||||
|
#define SEC_DATA 0x0080
|
||||||
|
|
||||||
/* pre-defined sections */
|
/* pre-defined sections */
|
||||||
enum {SECT_PAGE0, SECT_CODE, SECT_KDATA, SECT_DATA, SECT_UDATA };
|
enum {SECT_PAGE0, SECT_CODE, SECT_KDATA, SECT_DATA, SECT_UDATA };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user