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]

Re: Binutuls is broken now.


Hi Hans-Peter,

> Though when you said to Ian:
> > ... at this point in time we do not know which, if any, of the
> > sections in the input bfd will be mapped into the output bfd, so we
> > cannot reasonably check their flags.
> 
> you seemed to refer to section flags.  The HAS_RELOC file flag
> is in the bfd.

Doh!  I should take a refresher course in BFD flags.

Of course in theory the relocatable link may only be extracting
non-reloc-associated sections from the input bfd, but I think that
checking for this case is too much to ask.

> Since I had done this following patch anyway, I
> present it as a less restrictive alternative, given Ian's
> statement that bfd can handle -r for any file formats, as long
> as the input doesn't have relocs.
> 
> Either way, the documentation needs fixing.  I'll do that as
> soon as we settle what we allow with ld -r.
> 
> 	* ldlang.c (lang_check): Emit fatal error if relocatable link
> 	between different object flavours with relocations in input.

Approved.

Cheers
        Nick

PS.  I would suggest adding a comment explaining why it is not
supported.

> + 	einfo (_("%P%F: Relocatable linking with relocations from format %s (%B) to format %s (%B) is not supported\n"),


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