Index: lib/MC/MCParser/ELFAsmParser.cpp =================================================================== --- lib/MC/MCParser/ELFAsmParser.cpp +++ lib/MC/MCParser/ELFAsmParser.cpp @@ -235,6 +235,9 @@ if (getLexer().is(AsmToken::Minus)) { CurSize = 1; Lex(); // Consume the "-". + } else if (getLexer().is(AsmToken::Slash)) { + CurSize = 1; + Lex(); // Consume the "/". } else if (getLexer().is(AsmToken::String)) { CurSize = getTok().getIdentifier().size() + 2; Lex(); Index: test/MC/ELF/section.s =================================================================== --- test/MC/ELF/section.s +++ test/MC/ELF/section.s @@ -6,11 +6,13 @@ .section .note.GNU-stack2,"",%progbits .section .note.GNU-,"",@progbits .section -.note.GNU,"","progbits" +.section src/stacks.c,"",@progbits // CHECK: Name: .note.GNU-stack // CHECK: Name: .note.GNU-stack2 // CHECK: Name: .note.GNU- // CHECK: Name: -.note.GNU +// CHECK: Name: src/stacks.c // Test that the defaults are used