Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(924)

Unified Diff: third_party/binutils/ehframe.patch

Issue 596853002: [Gold] Fix race condition on parallel link (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/binutils/build-all.sh ('k') | third_party/binutils/ehframe-race.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/binutils/ehframe.patch
diff --git a/third_party/binutils/ehframe.patch b/third_party/binutils/ehframe.patch
deleted file mode 100644
index 428a62306834e7c6a41791d10295b13da4c53384..0000000000000000000000000000000000000000
--- a/third_party/binutils/ehframe.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff --git a/gold/ehframe.cc b/gold/ehframe.cc
-index 08a9ec6..be262bf 100644
---- a/gold/ehframe.cc
-+++ b/gold/ehframe.cc
-@@ -84,7 +84,8 @@ Eh_frame_hdr::Eh_frame_hdr(Output_section* eh_frame_section,
- eh_frame_section_(eh_frame_section),
- eh_frame_data_(eh_frame_data),
- fde_offsets_(),
-- any_unrecognized_eh_frame_sections_(false)
-+ any_unrecognized_eh_frame_sections_(false),
-+ lock_(NULL)
- {
- }
-
-@@ -102,6 +103,9 @@ Eh_frame_hdr::set_final_data_size()
- this->fde_offsets_.reserve(fde_count);
- }
- this->set_data_size(data_size);
-+ // We need a lock for updating the fde_offsets_ vector while writing
-+ // the FDEs.
-+ this->lock_ = new Lock();
- }
-
- // Write the data to the file.
-diff --git a/gold/ehframe.h b/gold/ehframe.h
-index 8aab8b8..d5ac668 100644
---- a/gold/ehframe.h
-+++ b/gold/ehframe.h
-@@ -60,7 +60,10 @@ class Eh_frame_hdr : public Output_section_data
- record_fde(section_offset_type fde_offset, unsigned char fde_encoding)
- {
- if (!this->any_unrecognized_eh_frame_sections_)
-- this->fde_offsets_.push_back(std::make_pair(fde_offset, fde_encoding));
-+ {
-+ Hold_lock(*this->lock_);
-+ this->fde_offsets_.push_back(std::make_pair(fde_offset, fde_encoding));
-+ }
- }
-
- protected:
-@@ -157,6 +160,8 @@ class Eh_frame_hdr : public Output_section_data
- // Whether we found any .eh_frame sections which we could not
- // process.
- bool any_unrecognized_eh_frame_sections_;
-+ // Lock held while updating fde_offsets_.
-+ Lock* lock_;
- };
-
- // This class holds an FDE.
« no previous file with comments | « third_party/binutils/build-all.sh ('k') | third_party/binutils/ehframe-race.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698