This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: relaxing partial links
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Nathan Sidwell <nathan at codesourcery dot com>, binutils <binutils at sources dot redhat dot com>
- Date: Wed, 9 Sep 2009 11:12:37 +0930
- Subject: Re: relaxing partial links
- References: <4A1C0274.2060100@codesourcery.com> <20090527015826.GH1387@bubble.grove.modra.org> <4A1CF018.6020106@codesourcery.com> <20090527121726.GJ1387@bubble.grove.modra.org>
On Wed, May 27, 2009 at 09:47:26PM +0930, Alan Modra wrote:
> In each target relax_section, add
>
> if (link_info->relocatable)
> (*link_info->callbacks->einfo) (_("%P%F: --relax and -r may not be used together\n"));
>
> Adjust as necessary for name of struct bfd_link_info * param.
>
> OK with those additions.
I gave bad/incomplete advice. xtensa can cope with ld -r --relax.
Applying mainline and branch.
* elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
Index: bfd/elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.117
diff -u -p -r1.117 elf32-xtensa.c
--- bfd/elf32-xtensa.c 2 Sep 2009 07:18:36 -0000 1.117
+++ bfd/elf32-xtensa.c 9 Sep 2009 00:12:27 -0000
@@ -6634,10 +6634,6 @@ elf_xtensa_relax_section (bfd *abfd,
static bfd_boolean relocations_analyzed = FALSE;
xtensa_relax_info *relax_info;
- if (link_info->relocatable)
- (*link_info->callbacks->einfo)
- (_("%P%F: --relax and -r may not be used together\n"));
-
if (!relocations_analyzed)
{
/* Do some overall initialization for relaxation. */
--
Alan Modra
Australia Development Lab, IBM