aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2021-12-31 11:42:07 +0000
committerTamar Christina <tamar.christina@arm.com>2021-12-31 11:42:07 +0000
commite5b10c4079279db9aa86225a3b4b4c30280c322e (patch)
tree60fc29354f1d122d28856a115e01e0c663f5e4d5
parent2e91308fb4b2d19c66203fcc2d8c43241fd101dd (diff)
downloadgdb-e5b10c4079279db9aa86225a3b4b4c30280c322e.zip
gdb-e5b10c4079279db9aa86225a3b4b4c30280c322e.tar.gz
gdb-e5b10c4079279db9aa86225a3b4b4c30280c322e.tar.bz2
ld: fix coff PE SEH
COFF_WITH_pex64 and COFF_WITH_peAArch64 can't be true at the same time. That means that two conditionals that control the sorting of the .pdata section became a falsum. The testsuite doesn't catch this because the linker does the sorting and to link you require library support from the unwinder so we can't test from binutils in isolation. bfd/ChangeLog: 2021-12-31 Tamar Christina <tamar.christina@arm.com> PR ld/28682 * peXXigen.c: Fix conditional.
-rw-r--r--bfd/peXXigen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 5f977ea..48e52b0 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -3088,7 +3088,7 @@ _bfd_XX_get_symbol_info (bfd * abfd, asymbol *symbol, symbol_info *ret)
coff_get_symbol_info (abfd, symbol, ret);
}
-#if !defined(COFF_WITH_pep) && defined(COFF_WITH_pex64) && defined(COFF_WITH_peAArch64)
+#if !defined(COFF_WITH_pep) && (defined(COFF_WITH_pex64) || defined(COFF_WITH_peAArch64))
static int
sort_x64_pdata (const void *l, const void *r)
{
@@ -4516,7 +4516,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
/* If there is a .pdata section and we have linked pdata finally, we
need to sort the entries ascending. */
-#if !defined(COFF_WITH_pep) && defined(COFF_WITH_pex64) && defined(COFF_WITH_peAArch64)
+#if !defined(COFF_WITH_pep) && (defined(COFF_WITH_pex64) || defined(COFF_WITH_peAArch64))
{
asection *sec = bfd_get_section_by_name (abfd, ".pdata");