aboutsummaryrefslogtreecommitdiff
path: root/bfd/peicode.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-12-15 22:09:30 +1030
committerAlan Modra <amodra@gmail.com>2020-12-16 15:17:52 +1030
commitcf7a3c01d82abdf110ef85ab770e5997d8ac28ac (patch)
tree13ec1df3179075cf8bf216fd986387978ffddc73 /bfd/peicode.h
parenta33fc9aed4b3b4384df63850c6fc9046ecbd97f4 (diff)
downloadgdb-cf7a3c01d82abdf110ef85ab770e5997d8ac28ac.zip
gdb-cf7a3c01d82abdf110ef85ab770e5997d8ac28ac.tar.gz
gdb-cf7a3c01d82abdf110ef85ab770e5997d8ac28ac.tar.bz2
Lose some COFF/PE static vars, and peicode.h constify
This patch tidies some COFF and PE code that unnecessarily used static variables to communicate between functions. * coffcode.h (pelength, peheader): Delete static variables. (coff_apply_checksum): Instead, define them as auto vars, and pass.. (coff_read_word, coff_compute_checksum): ..to here. Delete unnecessary forward declarations. * pei-x86_64.c (pdata_count): Delete static variable. (struct pex64_paps): New. (pex64_print_all_pdata_sections, pex64_bfd_print_pdata): Pass a pex64_paps for counting. * peicode.h (jtab): Constify.
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r--bfd/peicode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h
index f7d2b5f..27a156f 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -699,7 +699,7 @@ typedef struct
}
jump_table;
-static jump_table jtab[] =
+static const jump_table jtab[] =
{
#ifdef I386MAGIC
{ I386MAGIC,