mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
This patch reworks the fix to avoid a compile time warning so that it will work
with later versions of gcc. PR ld/16821 * peXXigen.c (_bfd_XXi_swap_sym_out): Rework fix to avoid compile time warning.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2014-04-28 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR ld/16821
|
||||||
|
* peXXigen.c (_bfd_XXi_swap_sym_out): Rework fix to avoid compile
|
||||||
|
time warning.
|
||||||
|
|
||||||
2014-04-26 Alan Modra <amodra@gmail.com>
|
2014-04-26 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* po/SRC-POTFILES.in: Regenerate.
|
* po/SRC-POTFILES.in: Regenerate.
|
||||||
|
@ -236,15 +236,12 @@ _bfd_XXi_swap_sym_out (bfd * abfd, void * inp, void * extp)
|
|||||||
reduce the absolute value to < 1^32, and then transforming the
|
reduce the absolute value to < 1^32, and then transforming the
|
||||||
symbol into a section relative symbol. This of course is a hack. */
|
symbol into a section relative symbol. This of course is a hack. */
|
||||||
if (sizeof (in->n_value) > 4
|
if (sizeof (in->n_value) > 4
|
||||||
/* GCC 4.6.x erroneously complains about the next test always being
|
/* The strange computation of the shift amount is here in order to
|
||||||
false when compiled on a 32-bit host. (The sizeof test above
|
avoid a compile time warning about the comparison always being
|
||||||
should have made the warning unnecessary). Hence we have to
|
false. It does not matter if this test fails to work as expected
|
||||||
predicate the test. It should not matter if the test is omitted
|
as the worst that can happen is that some absolute symbols are
|
||||||
since the worst that can happen is that some absolute symbols
|
needlessly converted into section relative symbols. */
|
||||||
are needlessly converted to equivalent section relative symbols. */
|
&& in->n_value > ((1ULL << (sizeof (in->n_value) > 4 ? 32 : 31)) - 1)
|
||||||
#if defined BFD64 || ! defined __GNUC__ || __GNUC__ > 4 || __GNUC_MINOR__ > 6
|
|
||||||
&& in->n_value > ((1ULL << 32) - 1)
|
|
||||||
#endif
|
|
||||||
&& in->n_scnum == -1)
|
&& in->n_scnum == -1)
|
||||||
{
|
{
|
||||||
asection * sec;
|
asection * sec;
|
||||||
|
Reference in New Issue
Block a user