aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2013-04-26 21:38:57 +0000
committerCary Coutant <ccoutant@google.com>2013-04-26 21:38:57 +0000
commite7c5ea405fd863a9fcf85d49694e0f69fd5511ec (patch)
treeb0f6073044c3fcf77b5cfba088ef59bc3ccf052c /gold/layout.h
parentee441d9a9a2df27e795cfdbf80048f42bb1504cc (diff)
downloadgdb-e7c5ea405fd863a9fcf85d49694e0f69fd5511ec.zip
gdb-e7c5ea405fd863a9fcf85d49694e0f69fd5511ec.tar.gz
gdb-e7c5ea405fd863a9fcf85d49694e0f69fd5511ec.tar.bz2
2013-04-26 Geoff Pike <gpike@chromium.org>
gold/ * gold.cc (queue_final_tasks): invoke layout->queue_build_id_tasks(). * layout.cc (Hash_task): New class. (Layout::queue_build_id_tasks): New function. (Layout::write_build_id): Handle single-thread portion of build ID computation. (In some cases, all of it is single-threaded.) Replace {sha1,md5}_process_bytes with {sha1,md5}_buffer to get the same functionality in fewer lines of code. * layout.h (Layout::queue_build_id_tasks): New function declaration. * options.h (General_options): make "--build-id" default to tree rather than sha1. Add two new options related to --build-id=tree: --build-id-chunk-size-for-treehash and --build-id-min-file-size-for-treehash. * Makefile.am: add testing of --build-id=tree and related new options (these tests will be invoked by "make check"). * Makefile.in: Regenerate.
Diffstat (limited to 'gold/layout.h')
-rw-r--r--gold/layout.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/layout.h b/gold/layout.h
index 6da9607..1743869 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -892,6 +892,13 @@ class Layout
const Output_data_reloc_generic* dyn_rel,
bool add_debug, bool dynrel_includes_plt);
+ // If a treehash is necessary to compute the build ID, then queue
+ // the necessary tasks and return a blocker that will unblock when
+ // they finish. Otherwise return BUILD_ID_BLOCKER.
+ Task_token*
+ queue_build_id_tasks(Workqueue* workqueue, Task_token* build_id_blocker,
+ Output_file* of);
+
// Compute and write out the build ID if needed.
void
write_build_id(Output_file*) const;
@@ -1354,6 +1361,12 @@ class Layout
Gdb_index* gdb_index_data_;
// The space for the build ID checksum if there is one.
Output_section_data* build_id_note_;
+ // Temporary storage for tree hash of build ID.
+ unsigned char* array_of_hashes_;
+ // Size of array_of_hashes_ (in bytes).
+ size_t size_of_array_of_hashes_;
+ // Input view for computing tree hash of build ID. Freed in write_build_id().
+ const unsigned char* input_view_;
// The output section containing dwarf abbreviations
Output_reduced_debug_abbrev_section* debug_abbrev_;
// The output section containing the dwarf debug info tree