diff options
author | Karl Schimpf <kschimpf@google.com> | 2013-07-02 14:36:36 -0700 |
---|---|---|
committer | Karl Schimpf <kschimpf@google.com> | 2013-07-02 14:36:36 -0700 |
commit | 4390b1a9ac86937b9f9886119b5fa0ffc77295eb (patch) | |
tree | 0ed3cbe3018c87f90bb55627066f6bdd5cfae9e0 /tools | |
parent | bdad02d55969b0963ac23e05578d28def5636ebd (diff) |
Simplify globals in PNaCl wire format based on normalized constants.
Generates simple global variable records, followed by list of records defining
byte initialization and relocations.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3504
R=mseaborn@chromium.org
Review URL: https://codereview.chromium.org/18111002
Diffstat (limited to 'tools')
-rw-r--r-- | tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp b/tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp index ee002dd729..7a44542022 100644 --- a/tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp +++ b/tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp @@ -97,6 +97,7 @@ static const char *GetBlockName(unsigned BlockID, case naclbitc::METADATA_BLOCK_ID: return "METADATA_BLOCK"; case naclbitc::METADATA_ATTACHMENT_ID: return "METADATA_ATTACHMENT_BLOCK"; case naclbitc::USELIST_BLOCK_ID: return "USELIST_BLOCK_ID"; + case naclbitc::GLOBALVAR_BLOCK_ID: return "GLOBALVAR_BLOCK"; } } @@ -259,6 +260,16 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID, default:return 0; case naclbitc::USELIST_CODE_ENTRY: return "USELIST_CODE_ENTRY"; } + case naclbitc::GLOBALVAR_BLOCK_ID: + switch (CodeID) { + default: return 0; + case naclbitc::GLOBALVAR_VAR: return "VAR"; + case naclbitc::GLOBALVAR_COMPOUND: return "COMPOUND"; + case naclbitc::GLOBALVAR_ZEROFILL: return "ZEROFILL"; + case naclbitc::GLOBALVAR_DATA: return "DATA"; + case naclbitc::GLOBALVAR_RELOC: return "RELOC"; + case naclbitc::GLOBALVAR_COUNT: return "COUNT"; + } } } |