This is the mail archive of the binutils@sourceware.org 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: Dead easy question - if you already know...


"Dave Korn" <dave.korn@artimi.com> writes:

>   I kind of already know that the answer is "yes", but I don't understand the
> logic behind it:
>
>   The standard idiom in bfd to find out if you're doing a relocatable or final
> link is to test if the output bfd pointer is NULL; if so, you're doing a final
> link, else you're doing a relocatable one.
>
>   But why?  Where's the output going, if not to an output bfd?

It is indeed going to an output BFD.  But that output BFD is not
passed to the relocation routines when doing a final link.

There is no good reason for this.  It could just as well be a boolean
flag.  Perhaps there was some need for the output_bfd before the
linker was rewritten around 1994 or so.

Ian


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