This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Binutuls is broken now.
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Subject: Re: Binutuls is broken now.
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- Date: 19 Jun 2001 17:58:40 +0100
- Cc: hjl at lucon dot org, binutils at sourceware dot cygnus dot com
- References: <200106191630.SAA18910@ignucius.axis.se>
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"),