All of lore.kernel.org
 help / color / mirror / Atom feed
* [OpenRISC] newlib, malloc missing, I must be missing something
@ 2016-08-25 14:01 Dan
  2016-08-25 14:39 ` Stefan Wallentowitz
  2016-08-25 15:23 ` Jeremy Bennett
  0 siblings, 2 replies; 3+ messages in thread
From: Dan @ 2016-08-25 14:01 UTC (permalink / raw)
  To: openrisc

Hello!

I just built the or1k tool suite according to the directions on
openrisk.io/newlib/building.html.  However, when trying to build my
first file, I'm getting:


% or1k-elf-gcc -O3 -o dhry.o -c dhry.c
% or1k-elf-ld -o dhry dhry.o
% or1k-elf-ld: warning: cannot find entry symbol _start; defaulting to
0000000000000000
dhry.o: In function `Func_2':
dhry.c:(.text+0x444): undefined reference to `strcmp'
dhry.o: In function `main':
dhry.c:(.text.startup+0x34): undefined reference to `malloc'
dhry.c:(.text.startup+0x48): undefined reference to `malloc'
dhry.c:(.text.startup+0x1e8): undefined reference to `strcmp'
dhry.c:(.text.startup+0x390): undefined reference to `exit'

However, if I just do the linking with GCC alone, I get:

% or1k-elf-gcc dhry.o -o dhry
% (No errors)

Any thoughts?

Thanks!

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.librecores.org/pipermail/openrisc/attachments/20160825/68ef21c5/attachment.html>

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

end of thread, other threads:[~2016-08-25 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-25 14:01 [OpenRISC] newlib, malloc missing, I must be missing something Dan
2016-08-25 14:39 ` Stefan Wallentowitz
2016-08-25 15:23 ` Jeremy Bennett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.