diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2024-09-19 18:22:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-19 18:22:39 -0700 |
| commit | 5c6310306f0a494c6fa54436b6fce5ef2ff0d715 (patch) | |
| tree | 5df7c7d9fef309bd4071de6643d26b6f8032c467 /linker_scripts | |
| parent | 34dcfbccc6c64a9394b54e6968791da92fcd18f5 (diff) | |
Remove include_data_with_rodata spec hack by incremental link of z_game_over (#1691)
Diffstat (limited to 'linker_scripts')
| -rw-r--r-- | linker_scripts/audio_table_rodata.ld | 17 | ||||
| -rw-r--r-- | linker_scripts/data_with_rodata.ld | 22 |
2 files changed, 22 insertions, 17 deletions
diff --git a/linker_scripts/audio_table_rodata.ld b/linker_scripts/audio_table_rodata.ld deleted file mode 100644 index 27eab49fc..000000000 --- a/linker_scripts/audio_table_rodata.ld +++ /dev/null @@ -1,17 +0,0 @@ -OUTPUT_ARCH (mips) - -/* Audio Table Linker Script, maps data into rodata */ - -SECTIONS { - - .rodata : - { - *(.data*) - *(.rodata*) - } - - /DISCARD/ : - { - *(*); - } -} diff --git a/linker_scripts/data_with_rodata.ld b/linker_scripts/data_with_rodata.ld new file mode 100644 index 000000000..07b69cda5 --- /dev/null +++ b/linker_scripts/data_with_rodata.ld @@ -0,0 +1,22 @@ +OUTPUT_ARCH (mips) + +/* Maps data into rodata, used for audio tables and z_game_over */ + +SECTIONS { + .rodata : + { + *(.data) + *(.rodata) + *(.rodata.str*) + *(.rodata.cst*) + } + + /DISCARD/ : + { + /* GNU ld assumes that the linker script always combines .gptab.data and + * .gptab.sdata into .gptab.sdata, and likewise for .gptab.bss and .gptab.sbss. + * To avoid dealing with this, we just discard all .gptab sections. + */ + *(.gptab.*) + } +} |
