This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Mispelling in bfdlink.h? - enum bfd_link_common_skip_ar_(a/s)ymbols
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Kristoffer Langeland <rainbowponyprincess at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 14 Oct 2009 16:25:33 +1030
- Subject: Re: Mispelling in bfdlink.h? - enum bfd_link_common_skip_ar_(a/s)ymbols
- References: <ec5276da0910132030m68df8d3dna95a032c8b6c8c@mail.gmail.com>
On Wed, Oct 14, 2009 at 05:30:34AM +0200, Kristoffer Langeland wrote:
> While rummaging around in bfdlink.h I came across an enum, as well as a
> single use of it looking like this (line 371, in struct bfd_link_info):
>
> /* Criteria for skipping symbols when detemining <-(determining)
> whether to include an object from an archive. */
> enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols;
>
> As even the comment speaks of symbols I'm pretty sure this should be
> ..._skip_ar_symbols across the board.
> Is this a simple typo? Perhaps a well known oddity preserved for sentimental
> reasons? Perhaps a quiet rebellion agains typing 'symbol' over and over
> again? Or is it impossible to change the header because it will break other
> software using the bfd library?
>
> grep tells me there's around 6 (4 in source, 2 in changelogs) references to
> this enum (and the field in bfd_link_info) in the binutils 2.19 sources. As
> far as I can see, all added by the same person at the same time (back in
> 2002). I considered contacting the original author directly, but he has not
> made a posting to the binutils mailing list since then (I think). I'm
> bothering you in stead.
Fixed.
include/
* bfdlink.h (enum bfd_link_common_skip_ar_symbols): Rename from
bfd_link_common_skip_ar_aymbols.
(struct bfd_link_info): Here too.
bfd/
* aoutx.h (aout_link_check_ar_symbols): Typo fix.
ld/
* emultempl/netbsd.em (gldnetbsd_before_parse): Typo fix.
Index: include/bfdlink.h
===================================================================
RCS file: /cvs/src/src/include/bfdlink.h,v
retrieving revision 1.79
diff -u -p -r1.79 bfdlink.h
--- include/bfdlink.h 9 Sep 2009 21:38:58 -0000 1.79
+++ include/bfdlink.h 14 Oct 2009 05:23:30 -0000
@@ -67,7 +67,7 @@ enum bfd_link_hash_type
bfd_link_hash_warning /* Like indirect, but warn if referenced. */
};
-enum bfd_link_common_skip_ar_aymbols
+enum bfd_link_common_skip_ar_symbols
{
bfd_link_common_skip_none,
bfd_link_common_skip_text,
@@ -371,9 +371,9 @@ struct bfd_link_info
/* Which local symbols to discard. */
enum bfd_link_discard discard;
- /* Criteria for skipping symbols when detemining
+ /* Criteria for skipping symbols when determining
whether to include an object from an archive. */
- enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols;
+ enum bfd_link_common_skip_ar_symbols common_skip_ar_symbols;
/* Char that may appear as the first char of a symbol, but should be
skipped (like symbol_leading_char) when looking up symbols in
Index: bfd/aoutx.h
===================================================================
RCS file: /cvs/src/src/bfd/aoutx.h,v
retrieving revision 1.78
diff -u -p -r1.78 aoutx.h
--- bfd/aoutx.h 9 Sep 2009 21:38:57 -0000 1.78
+++ bfd/aoutx.h 14 Oct 2009 05:23:33 -0000
@@ -3284,7 +3284,7 @@ aout_link_check_ar_symbols (bfd *abfd,
{
int skip = 0;
- switch (info->common_skip_ar_aymbols)
+ switch (info->common_skip_ar_symbols)
{
case bfd_link_common_skip_text:
skip = (type == (N_TEXT | N_EXT));
Index: ld/emultempl/netbsd.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/netbsd.em,v
retrieving revision 1.6
diff -u -p -r1.6 netbsd.em
--- ld/emultempl/netbsd.em 19 Jul 2007 19:56:10 -0000 1.6
+++ ld/emultempl/netbsd.em 14 Oct 2009 05:23:33 -0000
@@ -29,6 +29,6 @@ static void
gldnetbsd_before_parse (void)
{
gld${EMULATION_NAME}_before_parse ();
- link_info.common_skip_ar_aymbols = bfd_link_common_skip_text;
+ link_info.common_skip_ar_symbols = bfd_link_common_skip_text;
}
EOF
--
Alan Modra
Australia Development Lab, IBM