Skip to content

Commit

Permalink
Merge branch 'alignment-in-data-segment' into 'main'
Browse files Browse the repository at this point in the history
Allow alignment in data_segment

Closes rewriting/transforms/gtirb-sysenforce#8

See merge request rewriting/ddisasm!1219
  • Loading branch information
aeflores committed Oct 9, 2024
2 parents 73e9f8a + 9b11761 commit 8c21920
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* Fix symbolization bug of ADR instructions in ARM32 that refer to code.
* Fix bug in PE code inference that could lead to the whole .text section being
declared invalid if a data directory was attached to the end of the section.
* Add alignments to data blocks that require alignment even within data
sections

# 1.9.0

Expand Down
3 changes: 2 additions & 1 deletion src/datalog/main.dl
Original file line number Diff line number Diff line change
Expand Up @@ -698,11 +698,12 @@ the max alignment is picked for an EA later.
// requires aligned memory: e.g., some SIMD instructions
alignment_candidate(DataEA, AlignInBits):-
arch.alignment_required(EA,AlignInBits),
code(EA),
(
pc_relative_operand(EA,_,DataEA);
composite_data_access(_,EA,DataEA,AlignInBits)
),
data_in_code(Begin,End),
data_segment(Begin,End),
DataEA >= Begin,
DataEA < End.

Expand Down

0 comments on commit 8c21920

Please sign in to comment.