When I have an embedded system with two memory controllers that are contiguous, I receive a similar error during elfcheck:
"Analyzing file sw_application.elf...
ERROR:MDT - Section .text contents (0x40000000-0xd713) does not completely fit
into memory opb_bram_if_cntlr_1 (0x40000000-0x40007fff)
Elf file ELFCHECK_01.elf had errors. To build a correct elf file, use Linker
script generator to assist in generating the right linker script and use the
same for building the elf file.
make: *** [sw_application.elf] Error 2
Build complete for project sw_application"
Elfcheck does not recognize the contiguous memory space of the two memory controllers and considers only the first memory controller.
In EDK 9.1i, a new feature to validate generated ELF files has been added in SDK. This patch provides preference options for the user to turn the ELF Checker ON/OFF at the time of compilation of the ELF file:
Installation Instructions for SDK patch
1. Make a backup of the following directories:
NOTE: The backup should *not* be made within the "plugins" directory.
2. Unzip the file "sdk_elfcheck_patch_9.1.0.zip" into:
Elfcheck will be fixed in a future version of the software to accommodate contiguous memory spaces.
To turn off ELF checking in SDK, perform the following steps:
1 - Open you project
2 - Right click on your project and select Properties
3 - Highlite C/C++ Build
4 - Bring the Build Settings tab forward
5 - Deselect Perform ELF File Validation (recommended)
6 - Push the OK button
Note: EDK 9.2i and newer does not need the patch.