From fb2a2d6697bcf099018473cd4249fb1c450dc0ee Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 30 Sep 2019 13:27:29 -0700 Subject: 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 --- output/outcoff.c | 19 +++++++++++++++---- 1 file 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 -- cgit v1.2.1