Commit 493529c
cleanup: [smap] drop bogus section("data") from extern decls
main.c declared _exp_smap and _exp_smapmodu as extern with
__attribute__((section("data"))). Same pattern fixed in the previous
commit for errno: a bare "data" section name (no leading dot) does not
match the IRX linker script and ends up as an orphan that the IRX
loader does not allocate.
In this case the annotation was always harmless because the matching
DECLARE_EXPORT_TABLE in iop/kernel/include/irx.h places the actual
definition in .text via a section(".text\\n\\t#") asm trick. Section
attributes on extern declarations are hints only; the symbol's address
is governed by the definition. The smap.irx layout is unchanged: the
linked output still has _exp_smap at .text (verified with nm), and
srxfixup no longer warns.
The cleanup just removes the misleading attribute and inline comment
so the latent bug can't manifest if the export table macro or its
placement is ever refactored.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f63adb5 commit 493529c
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
278 | | - | |
| 283 | + | |
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
| |||
0 commit comments