commit | 76da8c7057d89bee93be5828790eb27119d2e056 | [log] [tgz] |
---|---|---|
author | Samuel Huang <huangs@chromium.org> | Tue Dec 04 19:38:07 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Dec 04 19:38:07 2018 |
tree | b124a12a21fb3c894c126ca679175599eabe0cbc | |
parent | 19fa17c7d4c41f5d2f943c1d99b08d3c6841f6ab [diff] |
[Supersize] Simplify linker_map_parser.py by removing _SymbolMaker. MapFileParserLld.Parse() traverses 3 indent levels: * Level 1 with indent 0: Sections names. * Level 2 with indent 8: Object path (may be '<internal>') and .o section name. * Level 3 with indent 16: Symbol names. Previously _SymbolMaker manages LLD .map file parsing by providing the following services: * Maintain a 'current symbol' that's modified when new data (perhaps at a deeper layer) are found. * Flush(): On detecting new symbol, stores the old 'current symbol' to to start anew (perhaps on emerging to a shallower layer). * Create(): Creates new 'current symbol'. Unfortunately, the code assumes that each contiguous Level 3 block corresponds to only one symbol. But to fix Bug 891576, we will need to break this assumption, and _SymbolMaker gets in the way! This CL remove _SymbolMaker without changing Supersize output. It turns out that since Create() is only called once (in Level 2), we don't really need Flush(). The code can be simplified by keeping a |syms| list, and directly modifying |syms[-1]|. Also add --dump argument to linker_map_parser.py's stand-alone parsing mode, to ensure identical results before and after this CL. Bug: 891576 Change-Id: I34b879c7e816049ec55f90d30f84213f6eb1acf9 Reviewed-on: https://chromium-review.googlesource.com/c/1361591 Reviewed-by: Samuel Huang <huangs@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#613647}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .