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]

Re: How do I link to a shared lib without having that lib's dependencies (the way MS link does)


Nick Clifton <nickc@redhat.com> writes:

>   It seems to me however that having three different switches to
>   control the linker's behaviour with undefined references is a bit
>   much.

Take a look at the Solaris linker.  I think it supports something like
-Bundefined and maybe some other -B options along these lines.  Or it
might be -z something--I can't remember.

>   So for example we could have one switch, say,
>   --ignore-unresolved-symbols=<setting> which could take a number of
>   different values:
> 
>     all                  [ignore any unresolved reference]
>     none                 [do not ignore any unresolved reference]
>     in-shared-libraries  [references from one shared library to another]
>     in-object-files      [references in object files]

An orthogonal choice is whether the message should be a warning or an
error.  In a case of static linking, it should clearly be an error.
In other cases, it is less clear.

Ian


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