This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Linker script to resolve common symbols.


Hi there, im investigating a way to "teach" the linker about certain references and how to resolve them

for example, i have a c program that uses gzread() from zlib, when i compile it i might get a message like

undefined reference to `gzread'

would it be possible to edit the linker script to know that if gzread is undefined, libz.a must be added to the list of files to link (this is just an example), so that i wouldnt need to use -lz, but it only links with libz if nescessary.

If you can give me any hints, id really appreciate it. Thanks.

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger



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