2009-05-04 03:31:24 linker placement
zigma dsp (GERMANY)
Message: 73543
Hi all,
In the example of simple application with ASM, it shows some .rodata section. Which file should I refer to, to understand what each sections means for a. Compiler and b. assembler. Is this what the linker script is for, and so where do I find the same? Are there any documentation, that explains what each section mean?
If I am correct, the building method used in bFLAT. It support 2 types: FDPIC ELF and FLAT. Is FLAT same as FRB (fully relocatable binaries)? Where can I find a picturesque description of the 2 formats (like a diagram..something showing the sections and how data is moved)?
Thanks &
Regards
QuoteReplyEditDelete
2009-05-04 09:58:08 Re: linker placement
Robin Getz (UNITED STATES)
Message: 73565
Zigma:
Before diving down into the details - (which are all in various places of the wiki) what are you trying to do?
If you are developing drivers for the Linux kernel - they are not relocatable. (fixed at link time), if you are developing bare metal - they are not relocatable. (fixed at link time),If you are developing linux modules, or linux applications or linux libraries - they are always relocatable.
-Robin
QuoteReplyEditDelete
2009-05-05 11:34:11 Re: linker placement
zigma dsp (GERMANY)
Message: 73672
Thank you Robin for your time.
I am trying to understand the memory placement. This includes the 'sections' to where to map to and how the build formats work.
I guess I could split the question to 2:
1. Where do I find info of what all 'sections' are available for the user, to place code and data (compiler and assembler)
and to what memory segment each are mapped to?
2. In the docs, I saw about FDPIC and FLAT. I have read the docs, and I wasn't able to visualize what is happening when I choose a particular format. For instance, how does the PIC works with the GOT or FLAT works with Relocation Tables. I do not know how much I need to know them.
Regards
JA.
QuoteReplyEditDelete
2009-05-05 14:29:20 Re: linker placement
Robin Getz (UNITED STATES)
Message: 73684
Zigma:
You never answered my question - what are you trying to build - Linux applications or bare metal applications?
-Robin
QuoteReplyEditDelete
2009-05-06 00:56:37 Re: linker placement
zigma dsp (GERMANY)
Message: 73725
Hi Robin,
Sorry, I should have mentioned this - I am building only Linux applications.
Thanks & Regards
JA.
QuoteReplyEditDelete
2009-05-06 05:52:04 Re: linker placement
Mike Frysinger (UNITED STATES)
Message: 73742
then you cannot control the layout of the application in memory at all. you should not touch any linker script in any way.
QuoteReplyEditDelete
2009-05-06 08:05:46 Re: linker placement
zigma dsp (GERMANY)
Message: 73751
MIke,
I am a bit confused. Then how does the placement explained in :-
docs.blackfin.uclinux.org/doku.php?id=using_l1_memory,
work for 'using L1 in user space'? Or is that the only 'option' for the user to map functions?
QuoteReplyEditDelete
2009-05-06 08:09:23 Re: linker placement
Mike Frysinger (UNITED STATES)
Message: 73752
the toolchain takes care of that for you. simply read and follow the directions and do not attempt to mess with linker scripts.