This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __malloc_lock


Franzi Edo. wrote:
Hi,
I am working on the porting of the reentrant version of newlib on my OS.
The problem I have is with __maloc_lock and __maloc_unlock functions.
In a separate library I have written all the stubs (xyz_r) necessary to work (I put in this place my implementation of __malloc_lock and __malloc_unlock).
Now, when I link my application the linker indicate to me a multiple definition problem:


../../../../../../../../GCC/gcc-4.1.1/newlib/libc/stdlib/mlock.c:49: multiple definition of `__malloc_lock'

How can I proceed to overwrite my __malloc_lock implementation over the standard one?


If you already have code in the libc/sys/YOUROS or libc/machine/YOURPLATFORM directory, simply add your lock/unlock implementation in a file called mlock.c. This uses the standard newlib override mechanism.


-- Jeff J.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]