Are there some linker switches to reduce the ROM size? I don't see how code+initialised data comes to 8694, certainly not from the map file? Are those other sections being lumped into the ROM in error?
Compiling alt_main.c...
Linking ems_boot.elf...
Info: (ems_boot.elf) 8694 Bytes program size (code + initialized data).
Info: 16382 KBytes free for stack + heap.
Hardware simulation is not enabled for the target SOPC Builder system. Skipping creation of hardware simulation model contents and simulation symbol files. (Note: This does not affect the instruction set simulator.)
Post-processing to create ems_boot_rom.hex
Build completed
[SOPC Builder]$ nios2-elf-objdump -h ems_boot.elf
ems_boot.elf: file format elf32-littlenios2
Sections:
Idx Name Size VMA LMA File off Algn
0 .entry 00000020 01000000 01000000 00000094 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .exceptions 000000d8 01000020 01000020 000000b4 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .text 000018c8 010000f8 010000f8 0000018c 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
3 .rodata 000001d2 010019c0 010019c0 00001a54 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .rwdata 00000020 00000000 00000000 00000074 2**2
CONTENTS, ALLOC, LOAD, DATA, SMALL_DATA
5 .bss 00000644 00000020 00000020 00000094 2**2
ALLOC, SMALL_DATA
6 .sdram 00000000 00000664 00000664 00001c26 2**0
CONTENTS
7 .epcs_controller 00000000 01004800 01004800 00001c26 2**0
CONTENTS
8 .ems_boot_rom 00000002 01001b92 01001b92 00001c26 2**0
CONTENTS
9 .comment 000002ec 00000000 00000000 00001c28 2**0
CONTENTS, READONLY
10 .debug_aranges 00000108 00000000 00000000 00001f18 2**3
CONTENTS, READONLY, DEBUGGING
11 .debug_pubnames 0000010b 00000000 00000000 00002020 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_info 00003266 00000000 00000000 0000212b 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_abbrev 00000821 00000000 00000000 00005391 2**0
CONTENTS, READONLY, DEBUGGING
14 .debug_line 00000b84 00000000 00000000 00005bb2 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_frame 00000198 00000000 00000000 00006738 2**2
CONTENTS, READONLY, DEBUGGING
16 .debug_str 00000977 00000000 00000000 000068d0 2**0
CONTENTS, READONLY, DEBUGGING
/cygdrive/f/projects/emshw/full_featured/software/ems_boot/release
[SOPC Builder]$