Skip to content

Commit 27079c1

Browse files
committed
Minor fixes
1 parent 5f424ef commit 27079c1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

content/post/orphan_sections_linker.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Key to Flags:
192192
y (purecode), p (processor specific)
193193
```
194194

195-
Now, the `.uninit` section is marked as NOBITS, meaning it will be allocated in memory but not stored
195+
Now, the `.uninit` section has the type `NOBITS`, meaning it will be allocated in memory but not stored
196196
in the ELF file, ensuring that no unnecessary data is included in the binary. Let's see the segments:
197197

198198
```
@@ -231,11 +231,10 @@ ideally at compile-time. I found the `--orphaned-handling` flag of the `ld` and
231231
This flag allows us to specify what should be the behavior when an orphaned
232232
section is encountered. You have the following options:
233233

234-
- `place`: the worst option. Just silently ignores that this section is orphaned
235-
and places it somewhere in memory.
236-
- `warn`: same as place, but at least it emits a warning when linking.
237-
- `error`: trigger a link-time error when a section is orphaned.
238-
- `discard`: The data in the orphaned section is just dropped.
234+
- `place`: silently ignores that this section is orphaned and places it somewhere in memory.
235+
- `warn`: same as place, but it emits a warning when linking.
236+
- `error`: triggers a link-time error when a section is orphaned.
237+
- `discard`: drops the data in the orphaned section.
239238

240239
By setting `--orphan-handling=error`, we prevent silent misplacement of sections,
241240
ensuring a predictable memory layout. This serves as a safeguard against subtle

0 commit comments

Comments
 (0)