mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 19:49:36 +00:00
RewriteInstance: account .stab and .stabstr as debug sections
Summary: .stab and .stabstr are special sections containing debugging information and strings associated with the debugging information. This commit adds them to the list of debugging sections, so these sections can be removed for output binary. Vasily Leonenko, Advanced Software Technology Lab, Huawei (cherry picked from FBD29746153)
This commit is contained in:
parent
0df7bf7b8b
commit
68be8caf3f
@ -5425,7 +5425,8 @@ bool RewriteInstance::willOverwriteSection(StringRef SectionName) {
|
||||
}
|
||||
|
||||
bool RewriteInstance::isDebugSection(StringRef SectionName) {
|
||||
if (SectionName.startswith(".debug_") || SectionName == ".gdb_index")
|
||||
if (SectionName.startswith(".debug_") || SectionName == ".gdb_index" ||
|
||||
SectionName == ".stab" || SectionName == ".stabstr")
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user