This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Indicate dependency on personality routines for ARMEHABI
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: Julian Brown <julian at codesourcery dot com>, binutils at sources dot redhat dot com
- Date: Wed, 09 Feb 2005 16:48:43 +0000
- Subject: Re: [PATCH] Indicate dependency on personality routines for ARMEHABI
- Organization: GNU
- References: <420A38B6.3010609@codesourcery.com> <m3hdkllmme.fsf@gossamer.airs.com>
On Wed, 2005-02-09 at 16:32, Ian Lance Taylor wrote:
> Julian Brown <julian@codesourcery.com> writes:
>
> > /* These relocs are only used within the ARM assembler. They are not
> > (at present) written to any object files. */
> > + BFD_RELOC_ARM_NONE,
>
> Why not just use BFD_RELOC_NONE here?
>
Ah! Good point
> In general you should only create a target specific BFD_RELOC enum
> constant for relocations which only arise on a particular target. For
> example, note that there is no BFD_ARM_RELOC_32.
>
> More generally, I think it's kind of dubious to use a zero reloc to
> mean anything at all. And why do you need a relocation entry? Why is
> it not sufficient to enter the symbol in the symbol table as an
> undefined symbol? Is the use of a zero reloc mandated by the ARM ABI?
Because the unwind module only weakly links to the personality modules
(but it is the one that ends up calling them).
The module that needs the unwinding has to provide the strong reference
to ensure that it gets included in the link set.
Doing it this way ensures that only personality modules that are needed
get included in the final image.
R.