Re: Linking with nonstandard malloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Enrico Weigelt <weigelt@xxxxxxxx> writes:

> * Patrick Horgan <phorgan1@xxxxxxxxx> wrote:
>
>> It's the order that they're seen by the linker.  Once the symbols are 
>> resolved they aren't looked for anymore, so your malloc.o would resolve 
>> malloc() and when glibc is looked at later, the linker would never look 
>> for malloc in there since it's already resolved.
>
> What happens to references to malloc() from libc or other
> libraries ? Do they also get the own symbol ?

If you mean: do references to malloc from libc get resolved to the
definition of malloc seen earlier, then the answer, at least on ELF
based systems like GNU/Linux, is yes.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux