From: Dan Murphy <dmurphy@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
Date: Fri, 17 Mar 2017 13:33:34 -0500 [thread overview]
Message-ID: <58CC2BFE.8060305@ti.com> (raw)
In-Reply-To: <CAPnjgZ3BJDVLp1k1jbQysEaGr8GR7uKxcG5N+2iscZ6V7k7K1Q@mail.gmail.com>
Simon
On 03/17/2017 01:24 PM, Simon Glass wrote:
> +ML
>
> Hi Dan,
>
> On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
>> Simon
>>
>> I wanted to drop you a note to see if you have any advice on how to fix this issue.
>>
>> In the attached .config file we enable
>>
>> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we need CONFIG_SPL_DFU_RAM
>>
>> When doing this we find that there is a build error
>>
>> common/built-in.o: In function `xrealloc':
>> common/cli_hush.c:3349: undefined reference to `realloc_simple'
>> common/built-in.o: In function `done_word':
>> common/cli_hush.c:2494: undefined reference to `realloc_simple'
>> cli_hush.c:2499: undefined reference to `realloc_simple'
>> common/built-in.o: In function `b_check_space':
>> common/cli_hush.c:876: undefined reference to `realloc_simple'
>> make[1]: *** [spl/u-boot-spl] Error 1
>> make: *** [spl/u-boot-spl] Error 2
>>
>> In digging into this I am finding that realloc_simple is not defined anywhere in uboot. malloc_simple.c seems
>> to be missing the implementation.
>>
>> I am looking to see if you have a patch that fixes this issue or if you can guide us to a resolution.
>>
>> Right now our only work around is to disable the HUSH_PARSER or turn off the MALLOC simple. Which according to
>> Lokesh, CC'd, is needed for DM support.
> So SPL is using hush? Is there a description somewhere of what it does
> with that?
HUSH_PARSER was added to the TI config in commit adad96e60 configs: Re-sync HUSH options.
HUSH calls realloc in the builtin functions. I am not sure what SPL would do with the HUSH.
> If you have enough space for hush I wonder whether you can just use
> full malloc() in SPL? You could implement realloc_simple() by just
> calling malloc_simple() and copying the old data over, but it is
> inefficient.
We could work around it but the undef reference will still exist for other code that would need realloc.
Lokesh
Do we run out of room using full malloc support in the SPL with the DM code added?
Dan
> Regards,
> Simon
--
------------------
Dan Murphy
next prev parent reply other threads:[~2017-03-17 18:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <58CC2801.9040109@ti.com>
2017-03-17 18:24 ` [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y Simon Glass
2017-03-17 18:33 ` Dan Murphy [this message]
2017-03-17 18:46 ` Simon Glass
2017-03-17 18:58 ` Dan Murphy
2017-03-20 2:29 ` Simon Glass
2017-03-20 3:31 ` Lokesh Vutla
2017-03-20 8:36 ` Lukasz Majewski
2017-03-21 2:56 ` Lokesh Vutla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58CC2BFE.8060305@ti.com \
--to=dmurphy@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox