All of lore.kernel.org
 help / color / mirror / Atom feed
* Build shared library (.so) for Mini-OS
@ 2013-04-08  8:54 Yiming Zhang
  2013-04-09 16:37 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Yiming Zhang @ 2013-04-08  8:54 UTC (permalink / raw)
  To: xen-devel

Dear all,

I want to realize dynamic library linking/loading for Mini-OS. The first
step is to build a shared libc library (.so) from newlib-1.16.0. To achieve
this, I modified the stubdom/Makefile to:

(i) build all obj files (libc_objs = *.o) with -fPIC option, and 
(ii) tried to do "gcc -shared -o libc.so $(libc_objs)"

However, the 2nd step cannot work because "string/memcpy.o" and
"machine/x86_64/memcpy.o" both have a memcpy() function. Is there any way to
build a shared libc library (.so) from newlib? (and how this problem is
addressed for standard glibc?) Thank you!

Cheers,
Yiming

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

* Re: Build shared library (.so) for Mini-OS
  2013-04-08  8:54 Build shared library (.so) for Mini-OS Yiming Zhang
@ 2013-04-09 16:37 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2013-04-09 16:37 UTC (permalink / raw)
  To: Yiming Zhang; +Cc: xen-devel@lists.xen.org

On Mon, 2013-04-08 at 09:54 +0100, Yiming Zhang wrote:
> Dear all,
> 
> I want to realize dynamic library linking/loading for Mini-OS.

Why? What is your eventual aim?

>  The first
> step is to build a shared libc library (.so) from newlib-1.16.0. To achieve
> this, I modified the stubdom/Makefile to:
> 
> (i) build all obj files (libc_objs = *.o) with -fPIC option, and 
> (ii) tried to do "gcc -shared -o libc.so $(libc_objs)"
> 
> However, the 2nd step cannot work because "string/memcpy.o" and
> "machine/x86_64/memcpy.o" both have a memcpy() function. Is there any way to
> build a shared libc library (.so) from newlib? (and how this problem is
> addressed for standard glibc?) Thank you!

I think you perhaps need to ask the newlib developers questions about
newlib?

I don't know much about newlib but mini-os at least implements a
single/static/monolithic kernel+application binary so I'm not sure how
much use shared libraries will be -- minios has no filesystem support
for one thing so I'm not sure where they would live.

Ian.

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

end of thread, other threads:[~2013-04-09 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08  8:54 Build shared library (.so) for Mini-OS Yiming Zhang
2013-04-09 16:37 ` Ian Campbell

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.