Build malloc.c shared object?

Carlos O'Donell
Tue Aug 12 13:06:00 GMT 2008

On Mon, Aug 11, 2008 at 9:39 AM, sam shepperd <> wrote:
> how2 build malloc.c shared object?  Please help....
> $ cd glibc-2.7/malloc
> $ gcc -O3 -g -fno-stack-protector -shared -ldl -o malloc.c

This is not possible without a lot more work.

> malloc.c:254:28: error: malloc-machine.h: No such file or directory

To start off with, you don't list the machine sysdep directories in
order as include search directories.

I recommend you build glibc for your target, saving the build log
file, and examine the command line used to build malloc.os and then
use that as the basis for your work.


More information about the Libc-help mailing list