-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: use _init as the start of large pages
The assumption that the .text section starts at the mapping following the one that contains `__executable_start` is not valid on 64-bit Ubuntu 18.04 where the whole code resides in one mapping. OTOH, The symbol `_init` is usually located at the beginning of the .text section and it does not need the assumption that the next mapping has the .text section. Thus, we use the symbol, if available, to perform the mapping on Ubuntu 18.04. We also rename the section into which we place the remapping code to `lpstub`. This causes the linker to produce symbols `__start_lpstub` and `__stop_lpstub`, the latter of which we do not use. Still, `__start_lpstub` helps us find the end of the .text section because on Ubuntu 18.04 this section is inserted before the end of the sole mapping, so we use `__start_lpstub` as the end instead of the end of the mapping.
- Loading branch information
Gabriel Schulhof
committed
Feb 26, 2020
1 parent
0dff851
commit 11f675c
Showing
1 changed file
with
42 additions
and
9 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