<?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>topic Re: multiple definition of '_malloc_r' in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/multiple-definition-of-malloc-r/m-p/352768#M11487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a matter of fact I believe that you need those linker flags. The MQX code implements a few functions that already defined and implemented in arm-gcc freestanding compiler.&lt;/P&gt;&lt;P&gt;What we need is to overwrite the compiler definitions of those functions. This is achieved by the previously mentioned linker flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Sep 2014 20:46:46 GMT</pubDate>
    <dc:creator>alejandrolozan1</dc:creator>
    <dc:date>2014-09-30T20:46:46Z</dc:date>
    <item>
      <title>multiple definition of '_malloc_r'</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/multiple-definition-of-malloc-r/m-p/352767#M11486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to build a C++ MQX 4.1.1 application on the TWR-VF65GS10_M4 (ARM-GCC 4_8-2014q1 and eclipse Luna 4.4.0). But it ends with the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gcc-arm-none-eabi-4_8-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/libg.a(lib_a-mallocr.o): In function `_malloc_r':&lt;/P&gt;&lt;P&gt;mallocr.c:(.text._malloc_r+0x0): multiple definition of `_malloc_r'&lt;/P&gt;&lt;P&gt;MQX_4_1_1_LINUX_GA/mqx/source/psp/cortex_m/compiler/gcc_arm/comp.c:94: first defined here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having a look into the provided makefiles (the mentioned project is an eclipse-based project), i found the following option in the linker-flags:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Xlinker -z -Xlinker muldefs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i use this linkerflag in my eclipse-project also the project compiles and links. But i would like to not use this scary linkerflag. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;How can i avoid this linkerflag?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 08:18:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/multiple-definition-of-malloc-r/m-p/352767#M11486</guid>
      <dc:creator>mstuehn</dc:creator>
      <dc:date>2014-09-29T08:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: multiple definition of '_malloc_r'</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/multiple-definition-of-malloc-r/m-p/352768#M11487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a matter of fact I believe that you need those linker flags. The MQX code implements a few functions that already defined and implemented in arm-gcc freestanding compiler.&lt;/P&gt;&lt;P&gt;What we need is to overwrite the compiler definitions of those functions. This is achieved by the previously mentioned linker flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 20:46:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/multiple-definition-of-malloc-r/m-p/352768#M11487</guid>
      <dc:creator>alejandrolozan1</dc:creator>
      <dc:date>2014-09-30T20:46:46Z</dc:date>
    </item>
  </channel>
</rss>

