diff options
author | Vladislav Khmelevsky <och95@yandex.ru> | 2023-02-06 17:13:46 +0400 |
---|---|---|
committer | Vladislav Khmelevsky <och95@yandex.ru> | 2023-03-15 00:06:55 +0400 |
commit | 207ea5f2e4c35c323c3956d32c3d422f2ef46398 (patch) | |
tree | 371be1ca9dba55835d567622adf0bb919b07f9d4 /bolt/include | |
parent | ab107b3fac7e837fa63ca020b98ada0d7c0ca556 (diff) | |
download | llvm-207ea5f2e4c35c323c3956d32c3d422f2ef46398.tar.gz |
[BOLT] Add writable segment for allocatable sections
The golang support creates 2 new data segments, one of them contains
relocations in PIC binaries, so the section must have writable rights.
Currently BOLT creates only one new segment that contains new sections
with RX rights, now also create RW segment if there are any new writable
sections were allocated during BOLT binary processing.
Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei
Differential Revision: https://reviews.llvm.org/D143390
Diffstat (limited to 'bolt/include')
-rw-r--r-- | bolt/include/bolt/Rewrite/RewriteInstance.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bolt/include/bolt/Rewrite/RewriteInstance.h b/bolt/include/bolt/Rewrite/RewriteInstance.h index 3f9fe5793078..54837aaccee3 100644 --- a/bolt/include/bolt/Rewrite/RewriteInstance.h +++ b/bolt/include/bolt/Rewrite/RewriteInstance.h @@ -474,6 +474,10 @@ private: uint64_t NewTextSegmentOffset{0}; uint64_t NewTextSegmentSize{0}; + /// New writable segment info. + uint64_t NewWritableSegmentAddress{0}; + uint64_t NewWritableSegmentSize{0}; + /// Track next available address for new allocatable sections. uint64_t NextAvailableAddress{0}; |