mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] blackfin: fix undefined reference with CONFIG_CMD_MAGICVAR
@ 2015-01-29  2:51 Masahiro Yamada
  2015-01-29  9:07 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2015-01-29  2:51 UTC (permalink / raw)
  To: barebox

For Blackfin, C symbols are prefixed with '_'.

If CONFIG_CMD_MAGICVAR is enabled for Blackfin, the following error occurs:

commands/built-in.o: In function `do_magicvar':
commands/magicvar.c:(.text+0x3326): undefined reference to `__barebox_magicvar_start'
commands/magicvar.c:(.text+0x332a): undefined reference to `__barebox_magicvar_end'
commands/magicvar.c:(.text+0x332e): undefined reference to `__barebox_magicvar_start'
commands/magicvar.c:(.text+0x3332): undefined reference to `__barebox_magicvar_end'
make: *** [barebox] Error 1

Add '_' to __barebox_magicvar_start and __barebox_magicvar_end,
like the other symbols in this linker script.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 arch/blackfin/boards/ipe337/barebox.lds.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/boards/ipe337/barebox.lds.S b/arch/blackfin/boards/ipe337/barebox.lds.S
index 21a91ee..9bb7cc4 100644
--- a/arch/blackfin/boards/ipe337/barebox.lds.S
+++ b/arch/blackfin/boards/ipe337/barebox.lds.S
@@ -68,9 +68,9 @@ SECTIONS
 	.barebox_cmd : { BAREBOX_CMDS }
 	___barebox_cmd_end = .;
 
-	__barebox_magicvar_start = .;
+	___barebox_magicvar_start = .;
 	.barebox_magicvar : { BAREBOX_MAGICVARS }
-	__barebox_magicvar_end = .;
+	___barebox_magicvar_end = .;
 
 	___barebox_initcalls_start = .;
 	.barebox_initcalls : { INITCALLS }
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] blackfin: fix undefined reference with CONFIG_CMD_MAGICVAR
  2015-01-29  2:51 [PATCH] blackfin: fix undefined reference with CONFIG_CMD_MAGICVAR Masahiro Yamada
@ 2015-01-29  9:07 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-01-29  9:07 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: barebox

On Thu, Jan 29, 2015 at 11:51:12AM +0900, Masahiro Yamada wrote:
> For Blackfin, C symbols are prefixed with '_'.
> 
> If CONFIG_CMD_MAGICVAR is enabled for Blackfin, the following error occurs:
> 
> commands/built-in.o: In function `do_magicvar':
> commands/magicvar.c:(.text+0x3326): undefined reference to `__barebox_magicvar_start'
> commands/magicvar.c:(.text+0x332a): undefined reference to `__barebox_magicvar_end'
> commands/magicvar.c:(.text+0x332e): undefined reference to `__barebox_magicvar_start'
> commands/magicvar.c:(.text+0x3332): undefined reference to `__barebox_magicvar_end'
> make: *** [barebox] Error 1
> 
> Add '_' to __barebox_magicvar_start and __barebox_magicvar_end,
> like the other symbols in this linker script.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-29  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  2:51 [PATCH] blackfin: fix undefined reference with CONFIG_CMD_MAGICVAR Masahiro Yamada
2015-01-29  9:07 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox