Topic : Creating non standard section names in the linker

Forum : Ride IDE

Original Post
Post Information Post
July 11, 2011 - 5:28pm
Guest

Our partner (uses IAR) wants us to send them an .ELF file with non standard section names because they said that they couldn't build a joint file with our .ELF using the standard .text and.data sections. They recommended using pragma commands to create something like companynametext and companynamedata sections.

1. Does this make sense?
2. We could not get the "pragma code_seg" command to work but we did get the "__attribute__ ((section .... " command to work. However we have to convert entire modules and the GNU recommendation is to change the linker script.
3. We are currently investigating how to change the linkersections script.
I've attached a copy of our current linker sections script in case someone can help with the changes.
4. Would it be better to bundle our object files into some sort of library and just give them the function calls that they need? Will this work between
RIDE7 and IAR? How do we do this?

Thanks,
-Aaron

Replies
Post Information Post
+1
0
-1
July 12, 2011 - 12:05pm
Raisonance Support Team

Hi again,

It does make sense, and __attribute__((section,...)) is the right way to go.
I think it is better to share the linker sections, so that your library and your customer's code will be freely intermixed.

One other thing to make sure of is that ARM APCS settings are selected for both compilers, in order for the fuction parameters to be in line with each other. Failing to set this option in both compilers may raise funny bugs with misaligned parameters, invalid variadic arguments (...) and the like.

Best Regards,

+1
0
-1
July 12, 2011 - 5:18pm
Guest

This makes sense, but the problem is we want to do this for the entire module. Is there an extension of the __attribute__((section,...)) command that will work for an entire module?

Thanks,
-Aaron