I have too many variables to relocate to the RAM2 area and it is not practical to go one my one to add the MACRO attribute. Is there a similar way to change the ld file in order to list the .o file where we want to place ALL variable from the source to a given section? Like "You can also explicitly assign the object files into a custom section... " explained for the former IDE at:
How to make extern variable of a file stored into a section
Assuming you are using MCUXpresso IDE, then read chapter 14, "Memory Configuration and Link Scripts" of the MCUXpresso IDE v10.1 User Guide, in particular section 14.10 and 14.11 on Freemarker Link Script Templates.
The other thing you could potentially do is relocate your heap and stack from their default locations into RAM2, allowing you to leave your variables where they are - as described in section 14.9.
Please post any additional questions on this into the MCUXpresso IDE forum : MCUXpresso IDE
MCUXpresso IDE Support