Skip to content

Commit 45d619b

Browse files
Alexander Gordeevhcahca
authored andcommitted
s390: expicitly align _edata and _end symbols on page boundary
Symbols _edata and _end in the linker script are the only unaligned expicitly on page boundary. Although _end is aligned implicitly by BSS_SECTION macro that is still inconsistent and could lead to a bug if a tool or function would assume that _edata is as aligned as others. For example, vmem_map_init() function does not align symbols _etext, _einittext etc. Should these symbols be unaligned as well, the size of ranges to update were short on one page. Instead of fixing every occurrence of this kind in the code and external tools just force the alignment on these two symbols. Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 0d4d523 commit 45d619b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/s390/kernel/vmlinux.lds.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ SECTIONS
7979
_end_amode31_refs = .;
8080
}
8181

82+
. = ALIGN(PAGE_SIZE);
8283
_edata = .; /* End of data section */
8384

8485
/* will be freed after init */
@@ -193,6 +194,7 @@ SECTIONS
193194

194195
BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
195196

197+
. = ALIGN(PAGE_SIZE);
196198
_end = . ;
197199

198200
/*

0 commit comments

Comments
 (0)