Good day everyone.
I have a large project for STM32H747XI and there is many of code files that could not be placed into main FLASH memory region so I'm trying to place it on external QSPI flash. So I created additional .qtext session for these files and placed it above main .text section.
.qtext : { . = ALIGN(4); ioquake3/* (.text) /* .text sections (code) */ ioquake3/* (.text*) /* .text* sections (code) */ _eqtext = .; /* define a global symbols at end of code */ . = ALIGN(4); } >QSPI
Original .text section which placed below also there.
.text : { . = ALIGN(4); *(.text) /* .text sections (code) */ *(.text*) /* .text* sections (code) */ *(.glue_7) /* glue arm to thumb code */ *(.glue_7t) /* glue thumb to arm code */ *(.eh_frame) KEEP (*(.init)) KEEP (*(.fini)) . = ALIGN(4); _etext = .; /* define a global symbols at end of code */ } >FLASH
But when I'm trying to compile it Linker throws me set of errors.
12:48:31 **** Incremental Build of configuration Debug for project ioquake3test_CM7 ****make all arm-none-eabi-g++ -o "ioquake3test_CM7.elf" @"objects.list" -mcpu=cortex-m7 -T"E:\STM32CubeIDE\ioquake3test\CM7\STM32H747XIHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="ioquake3test_CM7.map" -Wl,--gc-sections -static -u_printf_float --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-groupioquake3/swGL/CommandDrawTriangle.o:(.ARM.exidx.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE0EE10_M_releaseEv[_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE0EE10_M_releaseEv]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE0EE10_M_releaseEv'ioquake3/swGL/CommandDrawTriangle.o:(.ARM.exidx.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE0EED2Ev[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE0EED5Ev]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE0EED2Ev'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSt15_Rb_tree_headerC2Ev[_ZNSt15_Rb_tree_headerC5Ev]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt15_Rb_tree_headerC2Ev'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSt15_Rb_tree_header8_M_resetEv[_ZNSt15_Rb_tree_header8_M_resetEv]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt15_Rb_tree_header8_M_resetEv'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE13_Rb_tree_implISA_Lb1EEC2Ev[_ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE13_Rb_tree_implISA_Lb1EEC5Ev]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE13_Rb_tree_implISA_Lb1EEC2Ev'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE13_Rb_tree_implISA_Lb1EED2Ev[_ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE13_Rb_tree_implISA_Lb1EED5Ev]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE13_Rb_tree_implISA_Lb1EED2Ev'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EEC2Ev[_ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EEC5Ev]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN4SWGL7ContextEEESt10_Select1stIS6_ESt4lessIiESaIS6_EEC2Ev'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSt3mapIiSt10shared_ptrIN4SWGL7ContextEESt4lessIiESaISt4pairIKiS3_EEEC2Ev[_ZNSt3mapIiSt10shared_ptrIN4SWGL7ContextEESt4lessIiESaISt4pairIKiS3_EEEC5Ev]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt3mapIiSt10shared_ptrIN4SWGL7ContextEESt4lessIiESaISt4pairIKiS3_EEEC2Ev'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSt12__shared_ptrIN4SWGL7ContextELN9__gnu_cxx12_Lock_policyE0EED2Ev[_ZNSt12__shared_ptrIN4SWGL7ContextELN9__gnu_cxx12_Lock_policyE0EED5Ev]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt12__shared_ptrIN4SWGL7ContextELN9__gnu_cxx12_Lock_policyE0EED2Ev'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSt10shared_ptrIN4SWGL7ContextEED2Ev[_ZNSt10shared_ptrIN4SWGL7ContextEED5Ev]+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text._ZNSt10shared_ptrIN4SWGL7ContextEED2Ev'ioquake3/swGL/Context.o:(.ARM.exidx.text._ZNSaISt13_Rb_tree_nodeISt4pairIKiSt10shared_ptrIN4SWGL7ContextEEEEEC2Ev[_ZNSaISt13_Rb_tree_nodeISt4pairIKiSt10shared_ptrIN4SWGL7ContextEEEEEC5Ev]+0x0): additional relocation overflows omitted from the outputcollect2.exe: error: ld returned 1 exit statusmake: *** [makefile:122: ioquake3test_CM7.elf] Error 1"make all" terminated with exit code 2. Build might be incomplete.12:48:40 Build Failed. 1 errors, 0 warnings. (took 9s.177ms)
I also have more sections for .qrodata, .qdata and .qbss for same purpose but it throws me an errors only when I'm trying to create separated .qtext section.
What am I doing wrong?