[PATCH] [BFD] Fix override of COMMON symbols for a.out
The included patch is an attempt to fix a by now ancient bug in the
BFD initially merged a COMMON symbol with another symbol found in a
linker archive. Later a modification was suggested to make it possible
for a linker emulation to alter that behaviour. The patch for this
change was posted here:
A default case was added, which completely changed the behaviour. The
problem is, that the default value of link_info.common_skip_ar_symbols
(skip_none) is *not* part of the switch in aout_link_check_ar_symbols.
Without the default case no switch case would trigger and the existing
behaviour would have been kept. Now with the default case attached to
"bfd_link_common_skip_all" a library symbol will never override a
COMMON symbol... I cannot say whether the historical behaviour should
be reestablished as done in the suggested patch. If another change in
behaviour is not desired than the posted patch should be committed with
an addition: change the global default in ld/ldmain.c to "skip_all".
This would keep the current behaviour while allowing the historical
Re: [PATCH] [BFD] Fix override of COMMON symbols for a.out
On Thu, Jan 11, 2018 at 07:54:54PM +0100, [hidden email] wrote:
> 2018-01-12 Gunther Nikl <[hidden email]>
> * bfd/aoutx.h (aout_link_check_ar_symbols): Add
> bfd_link_common_skip_none and make it the switch default.
Applied with a slight variation.
* aoutx.h (aout_link_check_ar_symbols): Remove default and handle
bfd_link_common_skip_none in switch.
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 85ea86a..19364c0 100644
@@ -1,3 +1,8 @@
+2018-01-12 Gunther Nikl <[hidden email]>
+ * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
+ bfd_link_common_skip_none in switch.
2018-01-12 Alan Modra <[hidden email]>