mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
ELF: Add --strip-debug option.
If --strip-debug option is given, then all sections whose names start with ".debug" are removed from output. llvm-svn: 265722
This commit is contained in:
@@ -262,8 +262,13 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
|
||||
if (Name == ".note.GNU-stack")
|
||||
return &InputSection<ELFT>::Discarded;
|
||||
|
||||
if (Name == ".note.GNU-split-stack")
|
||||
if (Name == ".note.GNU-split-stack") {
|
||||
error("objects using splitstacks are not supported");
|
||||
return &InputSection<ELFT>::Discarded;
|
||||
}
|
||||
|
||||
if (Config->StripDebug && Name.startswith(".debug"))
|
||||
return &InputSection<ELFT>::Discarded;
|
||||
|
||||
// A MIPS object file has a special section that contains register
|
||||
// usage info, which needs to be handled by the linker specially.
|
||||
|
||||
Reference in New Issue
Block a user