Commit 70f0460
src: start the .text section with an asm symbol
We create an object file in assembly which introduces the symbol
`__node_text_start` into the .text section and place the resulting
object file as the first file the linker encounters. We do this to
ensure that we can recognize the boundaries of the .text section when
attempting to establish the address range to map to large pages.
Additionally, we rename the section containing the remapping code from
`.lpstub` to `lpstub` so as to take advantage of the linker's feature
whereby it inserts the symbol `__start_lpstub` when the section's name
can be rendered as a valid C variable. We need this symbol in order to
avoid self-mapping the remapping code to large pages, because doing so
would cause the process to crash.
PR-URL: #31981
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>1 parent 755da03 commit 70f0460Copy full SHA for 70f0460
File tree
Expand file treeCollapse file tree
3 files changed
+39
-14
lines changedOpen diff view settings
Filter options
- src/large_pages
Expand file treeCollapse file tree
3 files changed
+39
-14
lines changedOpen diff view settings
Collapse file
+20Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
313 | 313 | |
314 | 314 | |
315 | 315 | |
| 316 | + |
| 317 | + |
| 318 | + |
| 319 | + |
| 320 | + |
| 321 | + |
| 322 | + |
| 323 | + |
| 324 | + |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | + |
316 | 329 | |
317 | 330 | |
318 | 331 | |
| ||
498 | 511 | |
499 | 512 | |
500 | 513 | |
| 514 | + |
| 515 | + |
| 516 | + |
| 517 | + |
| 518 | + |
| 519 | + |
| 520 | + |
501 | 521 | |
502 | 522 | |
503 | 523 | |
|
Collapse file
src/large_pages/node_large_page.cc
Copy file name to clipboardExpand all lines: src/large_pages/node_large_page.cc+14-14Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
71 | 71 | |
72 | 72 | |
73 | 73 | |
74 | | - |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
75 | 79 | |
76 | 80 | |
77 | 81 | |
| ||
121 | 125 | |
122 | 126 | |
123 | 127 | |
| 128 | + |
| 129 | + |
124 | 130 | |
125 | 131 | |
126 | 132 | |
| ||
144 | 150 | |
145 | 151 | |
146 | 152 | |
147 | | - |
| 153 | + |
148 | 154 | |
149 | 155 | |
150 | | - |
151 | | - |
152 | | - |
153 | | - |
154 | | - |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
| 156 | + |
| 157 | + |
159 | 158 | |
160 | | - |
161 | | - |
| 159 | + |
| 160 | + |
| 161 | + |
162 | 162 | |
163 | 163 | |
164 | 164 | |
| ||
318 | 318 | |
319 | 319 | |
320 | 320 | |
321 | | - |
| 321 | + |
322 | 322 | |
323 | 323 | |
324 | 324 | |
|
Collapse file
src/large_pages/node_text_start.S
Copy file name to clipboard+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
0 commit comments