diff options
author | H. Peter Anvin <hpa@zytor.com> | 2019-09-30 13:27:29 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2019-09-30 13:30:15 -0700 |
commit | fb2a2d6697bcf099018473cd4249fb1c450dc0ee (patch) | |
tree | 712c3e6a6eccfa8a29f367e7b5188cf3869db516 /output | |
parent | 1dd926e8cedb2ec9664d28fea4cd929dc006b1cd (diff) | |
download | nasm-fb2a2d6697bcf099018473cd4249fb1c450dc0ee.tar.gz |
outcoff: add semi-generic pragma namespaces
Recognize the semi-generic pragma namespaces "coff" and "win" for
the win32 and win64 backends.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'output')
-rw-r--r-- | output/outcoff.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/output/outcoff.c b/output/outcoff.c index 92682990..60b7fdf8 100644 --- a/output/outcoff.c +++ b/output/outcoff.c @@ -1133,6 +1133,11 @@ extern macros_t coff_stdmac[]; #ifdef OF_COFF +static const struct pragma_facility coff_pragma_list[] = { + { "coff", NULL }, + { NULL, NULL } +}; + const struct ofmt of_coff = { "COFF (i386) (DJGPP, some Unix variants)", "coff", @@ -1153,15 +1158,21 @@ const struct ofmt of_coff = { null_segbase, coff_directives, coff_cleanup, - NULL /* pragma list */ + coff_pragma_list }; #endif -extern const struct dfmt df_cv8; #ifdef OF_WIN32 +static const struct pragma_facility coff_win_pragma_list[] = { + { "win", NULL }, + { "coff", NULL }, + { NULL, NULL } +}; + +extern const struct dfmt df_cv8; static const struct dfmt * const win32_debug_arr[2] = { &df_cv8, NULL }; const struct ofmt of_win32 = { @@ -1184,7 +1195,7 @@ const struct ofmt of_win32 = { null_segbase, coff_directives, coff_cleanup, - NULL /* pragma list */ + coff_win_pragma_list }; #endif @@ -1213,7 +1224,7 @@ const struct ofmt of_win64 = { null_segbase, coff_directives, coff_cleanup, - NULL /* pragma list */ + coff_win_pragma_list }; #endif |