From: Jan Beulich <jbeulich@suse.com>
Date: Tue, 29 Mar 2022 06:19:14 +0000 (+0200)
Subject: bfd/Dwarf2: gas doesn't mangle names
X-Git-Tag: binutils-2_39~1287
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=ddfc2f56d5782af79c696d7fef7c73bba11e8b09

bfd/Dwarf2: gas doesn't mangle names

Include the language identifier emitted by gas in the set of ones where
no mangled names are expected. Even if there could be "hand-mangled"
names, gas doesn't emit DW_AT_linkage_name in the first place.
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=ddfc2f56d5782af79c696d7fef7c73bba11e8b09]    

CVE: CVE-2022-48065 

Signed-off-by: Sanjana Venkatesh <Sanjana.Venkatesh@windriver.com>

---

diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 8cd0ce9d425..9aa4e955a5e 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1441,6 +1441,7 @@ non_mangled (int lang)
     case DW_LANG_PLI:
     case DW_LANG_UPC:
     case DW_LANG_C11:
+    case DW_LANG_Mips_Assembler:
       return true;
     }
 }
