<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to make section position independent?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25774/how-to-make-section-position-independent</link><description> 
Hello, 
i work with uVision 3 V3.72, linker V3.1.0.942. i check in linker
options make ro section postion independent and also use memory
layout from the Target dialog.And duing linking shows warnign L6914W:
option ropi ignored when using --scatter</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How to make section position independent?</title><link>https://community.arm.com/thread/115840?ContentTypeID=1</link><pubDate>Mon, 09 Aug 2010 00:40:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:71f6294a-63d4-4031-b97a-79199aaff270</guid><dc:creator>Stephan Gee</dc:creator><description>&lt;p&gt;&lt;p&gt;
You must not activate &amp;quot;Use Memory Layout from Target Dialog&amp;quot;, also
the field &amp;quot;Scatter File&amp;quot; must be empty. As soon as you use one of
them the --scatter control string will be addet because also the &amp;quot;Use
Memory Layout from Target Dialog&amp;quot; is generating a scatter file with
the values you entered on the target tab.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make section position independent?</title><link>https://community.arm.com/thread/102206?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2010 05:47:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5e0703eb-1be6-4332-8411-1c508d0cf9ce</guid><dc:creator>mrmz m</dc:creator><description>&lt;p&gt;&lt;p&gt;
ANY IDEA?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make section position independent?</title><link>https://community.arm.com/thread/78421?ContentTypeID=1</link><pubDate>Sun, 20 Jun 2010 23:42:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b4cfb953-bd0b-4050-8062-4b4e31b744a6</guid><dc:creator>mrmz m</dc:creator><description>&lt;p&gt;&lt;p&gt;
Well the problem is that i DO NOT pass both &amp;#39;--ropi&amp;#39; and
&amp;#39;--scatter&amp;#39; to the linker. As i wrote above i checked: use memory
layout from the Target dialog so i don&amp;#39;t use any scatter file but in
linker control string appears --scatter and there is no checkbox or
something else which can let me to turn off scatter file. That is why
i believe there is a mistake in uVision version which i use.&lt;br /&gt;
Have you got any idea how turn off scatter file in my uVision
version.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make section position independent?</title><link>https://community.arm.com/thread/65681?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2010 06:57:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1ddd4e1d-e2b6-4785-a9f7-fe83bb5a0a82</guid><dc:creator>Scott Douglass</dc:creator><description>&lt;p&gt;&lt;p&gt;
You wrote &amp;gt;&amp;gt;&lt;br /&gt;
And duing linking shows warnign L6914W: option ropi ignored when
using --scatter. My question is why? Why this warning has
appeared?&lt;br /&gt;
&amp;lt;&amp;lt;&lt;/p&gt;

&lt;p&gt;
This warning indicates that you are passing both &amp;#39;--ropi&amp;#39; and
&amp;#39;--scatter&amp;#39; to the linker. If you are passing --scatter (and a
scatter file) then the --ropi option is not going to have any effect,
which is why the linker is giving a warning.&lt;/p&gt;

&lt;p&gt;
This is covered in the manual, which you might want to read:
&amp;lt;&lt;a href="http://www.keil.com/support/man/docs/armlinkref/armlinkref_chdechji.htm%3E"&gt;http://www.keil.com/support/man/docs/armlinkref/armlinkref_chdechji.htm&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make section position independent?</title><link>https://community.arm.com/thread/115837?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2010 02:21:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cad214ed-6726-4ac9-a9e7-a4d9f7ba49cc</guid><dc:creator>mrmz m</dc:creator><description>&lt;p&gt;&lt;p&gt;
After a compilation appears a bin file. i want this bin file using
a bootloader to put at any address. It must work properly if
bootloader will put it at addres 0x100000 or at addres 0x110000.So
the code must be position independent.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make section position independent?</title><link>https://community.arm.com/thread/104048?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2010 01:54:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1ba9c176-e7e1-4320-9309-8bae12d5927e</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
But you still did not give any information about whatyou consider
&amp;quot;position independent&amp;quot;. If the code moves to a 1kB higher address -
what about global variables? Should they also move or stay fixed?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make section position independent?</title><link>https://community.arm.com/thread/78422?ContentTypeID=1</link><pubDate>Thu, 17 Jun 2010 23:22:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b2b313e7-b198-4d9f-b822-46caf4fbe8f7</guid><dc:creator>mrmz m</dc:creator><description>&lt;p&gt;&lt;p&gt;
I believe this answer gives some information but i want to know
how to make my position independent. i just want my program to work
independently to any adress.i want the same program to work if i will
load it to any area without making any changes to linker.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make section position independent?</title><link>https://community.arm.com/thread/58336?ContentTypeID=1</link><pubDate>Thu, 17 Jun 2010 06:49:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1a216d8c-db71-48b2-9f76-752afdd7cc37</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Position-independant code requires the memory addresses to be
relative.&lt;/p&gt;

&lt;p&gt;
A scatter file allows multiple memory areas to be specified.&lt;/p&gt;

&lt;p&gt;
Position-independant code would not manage that you move one
memory area but keeps the other fixed since that would change the
relative distance.&lt;/p&gt;

&lt;p&gt;
In the end, you will really have to think twice about your memory
layout and use of global variables or pointers with hard-coded
destination when working with position-independant code.&lt;/p&gt;

&lt;p&gt;
Moving the code to a 4kB higher address may not mean that you want
all variable references to also move to a 4kB higher address...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>