".section\t.bss",
".section\t.tbss,\"awT\",@nobits",
".section\t.ctors,\"aw\",@progbits"
+ },
+ {
+ ".section\t.text",
+ ".section\t.data",
+ ".section\t.rodata",
+ ".section\t.bss",
+ ".section\t.tbss,\"awT\",@nobits",
+ ".section\t.ctors,\"aw\",@progbits"
}
};
}
if (variability == variability_uninitialized) {
- if(emit_as_common) {
- if (be_gas_flavour == GAS_FLAVOUR_NORMAL)
+ if (emit_as_common) {
+ switch (be_gas_flavour) {
+ case GAS_FLAVOUR_NORMAL:
+ case GAS_FLAVOUR_YASM:
obstack_printf(obst, "\t.comm %s,%u,%u\n",
ld_name, get_type_size_bytes(type), align);
- else
+ break;
+ case GAS_FLAVOUR_MINGW:
obstack_printf(obst, "\t.comm %s,%u # %u\n",
ld_name, get_type_size_bytes(type), align);
+ break;
+ }
} else {
obstack_printf(obst, "\t.zero %u\n", get_type_size_bytes(type));
}
typedef enum asm_flavour_t {
GAS_FLAVOUR_NORMAL = 0, /**< normal gas (ELF) */
GAS_FLAVOUR_MINGW = 1, /**< MinGW variant (no-ELF) */
- GAS_FLAVOUR_MAX = 2
+ GAS_FLAVOUR_YASM = 2, /**< YASM GNU parser */
+ GAS_FLAVOUR_MAX = 3
} be_gas_flavour_t;
/** The variable where the GAS dialect is stored. */
static const lc_opt_enum_int_items_t gas_items[] = {
{ "normal", GAS_FLAVOUR_NORMAL },
{ "mingw", GAS_FLAVOUR_MINGW },
+ { "yasm", GAS_FLAVOUR_YASM },
{ NULL, 0 }
};