<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S32KのトピックRe: I cannot get a Position Independent Executable (PIE) for S32K3</title>
    <link>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2030823#M45281</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/240103"&gt;@FabrikSal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the software team, the RTD driver has not been verified with the PIC and is not intended for integration with it. However, if RTDs are not part of your plans, you may find helpful information in the community threads where this topic has been discussed.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio/What-are-the-Steps-after-activating-Position-Independ-Code-PIC/td-p/1765712" target="_blank" rel="noopener"&gt;What are the Steps after activating Position Independ Code (PIC) for A/B Swaping?&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K/How-to-create-flash-driver-for-S32K3xx-as-independent-position/td-p/1766308" target="_blank" rel="noopener"&gt;How to create flash driver for S32K3xx as independent position code&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2025 18:35:41 GMT</pubDate>
    <dc:creator>VaneB</dc:creator>
    <dc:date>2025-01-20T18:35:41Z</dc:date>
    <item>
      <title>I cannot get a Position Independent Executable (PIE) for S32K3</title>
      <link>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2027659#M45095</link>
      <description>&lt;P&gt;I’m trying to get a position independent executable (PIE) for simple embedded application (led blinking) that uses SDK. The application runs on EVB equipped with S32K311. I’m using IDE S32DS 3.5 and I’ve set the gcc &amp;nbsp;option &lt;EM&gt;-fPIC, -fPIE&lt;/EM&gt; &amp;nbsp;for compiler and &lt;EM&gt;-pie&lt;/EM&gt; for the linker and I’ve modified the linker script in order to place the got table. However the generated executable doesn’t work as PIE. It means that if I try to load it in an address other than the one for which it was built, it doesn’t work anymore.&lt;/P&gt;&lt;P&gt;In order to investigate the issue, I did some analysis about the generated .elf file with readelf commands. Following I summarize the results:&lt;/P&gt;&lt;P&gt;File Type is “EXEC” (Should be type “DYN”?)&lt;BR /&gt;Entry point address is an absolute address while an offset is expected&lt;BR /&gt;On the other hand, I’ve found some features related to a PIC/PIE executable:&lt;/P&gt;&lt;P&gt;In the Program Header there is a dynamic interpreter:&lt;BR /&gt;INTERP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x011140 0x00401140 0x00401140 0x00011 0x00011 R&amp;nbsp;&amp;nbsp; 0x1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Requesting program interpreter: /usr/lib/ld.so.1]&lt;/P&gt;&lt;P&gt;Section &lt;STRONG&gt;FLAGS_1&lt;/STRONG&gt; value: &lt;STRONG&gt;PIE&lt;/STRONG&gt;&lt;BR /&gt;Section &lt;EM&gt;.rel.dyn&lt;/EM&gt;&amp;nbsp;exists and contains several items (more than 300) type&amp;nbsp;R_ARM_RELATIVE&lt;BR /&gt;Section .got present&lt;BR /&gt;Can anyone help me to understand what is the problem? Why the executable .elf is not "DYN" although the &lt;EM&gt;-fPIC, -fPIE -pie&lt;/EM&gt; &amp;nbsp;options have been set in the IDE? Is the Type "DYN" really mandatory instead of "EXEC" to be a position independent executable? In attached the .elf file. Furthermore, why I cannot find the options &lt;EM&gt;-fPIC -fPIE&lt;/EM&gt; neither in the makefile (automatically generated) nor in the relative .&lt;EM&gt;args&lt;/EM&gt; file? While &lt;EM&gt;-pie&lt;/EM&gt; is present in .&lt;EM&gt;args&lt;/EM&gt; file I can find &lt;EM&gt;-fPIC -fPIE&lt;/EM&gt; only in .&lt;EM&gt;cproject &lt;/EM&gt;file. So, are those options really applied? In attached you can find my whole project.&lt;/P&gt;&lt;P&gt;I also tried to set the -shared option, but it doesn't affect the .elf file.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Note&lt;/U&gt;&lt;/STRONG&gt;: I've already had a look at the picExample:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32K144-Position-Independent-Code/ta-p/1102520" target="_blank"&gt;EXAMPLE S32K144 Position Independent Code - NXP Community&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but there are some differences: it refers to a previous IDE version, different micro family (S32K1xx)and the used application is without SDK.&lt;/P&gt;&lt;P&gt;Many thanks in advance for supporting.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 15:12:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2027659#M45095</guid>
      <dc:creator>FabrikSal</dc:creator>
      <dc:date>2025-01-14T15:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot get a Position Independent Executable (PIE) for S32K3</title>
      <link>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2027783#M45100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/240103"&gt;@FabrikSal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While PIE is commonly used in general-purpose computing environments (e.g., Linux), its application in embedded systems or microcontroller development is less frequent due to the constraints of these environments.&lt;/P&gt;
&lt;P&gt;Unfortunately, we do not have a working example for creating a Position-Independent Executable (PIE) in this context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, VaneB&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 20:44:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2027783#M45100</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2025-01-14T20:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot get a Position Independent Executable (PIE) for S32K3</title>
      <link>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2029844#M45213</link>
      <description>Does it mean that IDE S32DS 3.5 actually cannot generate a PIE executable for S32K3XX, or simply that there is no available example for it? In the last case, any answer to my different questions could be useful in continuing to investigate the issue on my own.&lt;BR /&gt;Thank you!&lt;BR /&gt;FabrikSal</description>
      <pubDate>Fri, 17 Jan 2025 15:01:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2029844#M45213</guid>
      <dc:creator>FabrikSal</dc:creator>
      <dc:date>2025-01-17T15:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot get a Position Independent Executable (PIE) for S32K3</title>
      <link>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2029931#M45219</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/240103"&gt;@FabrikSal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the information provided by our internal team, the functionality you are requesting will not work without an operating system that supports it. As previously mentioned, this feature is typically related to Linux OS and is generally used in the development of desktop applications running under such an OS environment.&lt;/P&gt;
&lt;P&gt;Unfortunately, we do not have any additional information, resources, or documentation available for this specific application. Therefore, the implementation and functionality of the feature will be entirely dependent on your own development and how you choose to implement it within your system.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 18:46:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2029931#M45219</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2025-01-17T18:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot get a Position Independent Executable (PIE) for S32K3</title>
      <link>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2030003#M45222</link>
      <description>Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&lt;BR /&gt;Ok, it's clear. Instead, does the example related to S32K144 built in S32DS ARM 2.2 tools (&lt;A href="https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32K144-Position-Independent-Code/ta-p/1102520" target="_blank"&gt;https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32K144-Position-Independent-Code/ta-p/1102520&lt;/A&gt;) work in embedded application without OS? in case yes, is there any reason why this feature has not been ported to S32K3XX platform and S32DS 3.5?&lt;BR /&gt;Thank you very much for supporting.&lt;BR /&gt;Best regards&lt;BR /&gt;FabrikSal</description>
      <pubDate>Fri, 17 Jan 2025 23:02:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2030003#M45222</guid>
      <dc:creator>FabrikSal</dc:creator>
      <dc:date>2025-01-17T23:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot get a Position Independent Executable (PIE) for S32K3</title>
      <link>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2030823#M45281</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/240103"&gt;@FabrikSal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the software team, the RTD driver has not been verified with the PIC and is not intended for integration with it. However, if RTDs are not part of your plans, you may find helpful information in the community threads where this topic has been discussed.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio/What-are-the-Steps-after-activating-Position-Independ-Code-PIC/td-p/1765712" target="_blank" rel="noopener"&gt;What are the Steps after activating Position Independ Code (PIC) for A/B Swaping?&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K/How-to-create-flash-driver-for-S32K3xx-as-independent-position/td-p/1766308" target="_blank" rel="noopener"&gt;How to create flash driver for S32K3xx as independent position code&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 18:35:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2030823#M45281</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2025-01-20T18:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot get a Position Independent Executable (PIE) for S32K3</title>
      <link>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2033467#M45415</link>
      <description>Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;,&lt;BR /&gt;yes, normally I would like to include RTD in my application(s), however the threads you've shared could be useful.&lt;BR /&gt;Thank you very much for the information.&lt;BR /&gt;Best Regards&lt;BR /&gt;FabrikSal</description>
      <pubDate>Thu, 23 Jan 2025 22:19:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I-cannot-get-a-Position-Independent-Executable-PIE-for-S32K3/m-p/2033467#M45415</guid>
      <dc:creator>FabrikSal</dc:creator>
      <dc:date>2025-01-23T22:19:19Z</dc:date>
    </item>
  </channel>
</rss>

