forked from openenclave/openenclave
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix thread local section alignment issue.
Earlier, we used to choose the larger of the two alignments to align both the sections. This is incorrect. For example, if tbss has a smaller alignment than tdata, then using the larger alignment value will increase the size of the tdata section. This will inturn cause a shift in the start of the tdata section which immediately precedes tbss section. The tdata template will be copied to the region starting at the incorrect tdata start. The fix is to - First compute the aligned start of the tbss section. - Then subract the tdata size from tbss start and then align it to data alignment to obtain tdata start. Signed-off-by: Anand Krishnamoorthi <[email protected]>
- Loading branch information
Showing
2 changed files
with
13 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters