diff options
author | H. Peter Anvin <hpa@zytor.com> | 2017-03-14 18:58:35 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2017-03-14 18:58:35 -0700 |
commit | e74fd4b7b851a3e731800913e907ae1b230a6511 (patch) | |
tree | 6d91e65087824f76203518b9120c9baba47ed276 | |
parent | 6e4ceb7ba1450174fc8f416a2b0b1465d06af625 (diff) | |
download | nasm-e74fd4b7b851a3e731800913e907ae1b230a6511.tar.gz |
outelf: claim %pragma elf as our namespace
We don't have any elf pragmas yet, but we want to be able to do
"%pragma elf" and have it work for any of the elf formats.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | output/outelf.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/output/outelf.c b/output/outelf.c index 8be97b39..d99a49b0 100644 --- a/output/outelf.c +++ b/output/outelf.c @@ -2214,6 +2214,14 @@ static int elf_set_info(enum geninfo type, char **val) return 0; } +/* Claim "elf" as a pragma namespace, for the future */ +static const struct pragma_facility elf_pragma_list[] = +{ + { "elf", NULL }, + { NULL, NULL } /* Implements the canonical output name */ +}; + + static const struct dfmt elf32_df_dwarf = { "ELF32 (i386) dwarf debug format for Linux/Unix", "dwarf", @@ -2262,7 +2270,7 @@ const struct ofmt of_elf32 = { elf_directive, elf_filename, elf_cleanup, - NULL /* pragma list */ + elf_pragma_list, }; static const struct dfmt elf64_df_dwarf = { @@ -2313,7 +2321,7 @@ const struct ofmt of_elf64 = { elf_directive, elf_filename, elf_cleanup, - NULL /* pragma list */ + elf_pragma_list, }; static const struct dfmt elfx32_df_dwarf = { @@ -2339,7 +2347,7 @@ static const struct dfmt elfx32_df_stabs = { debug_typevalue, stabs_output, stabs_cleanup, - NULL /* pragma list */ + elf_pragma_list, }; static const struct dfmt * const elfx32_debugs_arr[3] = |