Fix the name of the section end symbol.

It is __stop_<sec>, not __end_<sec>.

llvm-svn: 309225
This commit is contained in:
Rafael Espindola 2017-07-26 22:52:53 +00:00
parent 6dac9134f9
commit 6c4f5b41a3
2 changed files with 4 additions and 4 deletions

View File

@ -253,7 +253,7 @@ template <class ELFT> void elf::markLive() {
Enqueue({Sec, 0});
else if (isValidCIdentifier(Sec->Name)) {
CNamedSections[Saver.save("__start_" + Sec->Name)].push_back(Sec);
CNamedSections[Saver.save("__end_" + Sec->Name)].push_back(Sec);
CNamedSections[Saver.save("__stop_" + Sec->Name)].push_back(Sec);
}
}

View File

@ -13,19 +13,19 @@
# DISASM: _start:
# DISASM-NEXT: 201000: e8 05 00 00 00 callq 5 <__start_foo>
# DISASM-NEXT: 201005: e8 01 00 00 00 callq 1 <__start_bar>
# DISASM-NEXT: 201005: e8 02 00 00 00 callq 2 <__stop_bar>
# DISASM-NEXT: Disassembly of section foo:
# DISASM-NEXT: __start_foo:
# DISASM-NEXT: 20100a: 90 nop
# DISASM-NEXT: Disassembly of section bar:
# DISASM-NEXT: __start_bar:
# DISASM-NEXT: bar:
# DISASM-NEXT: 20100b: 90 nop
.global _start
.text
_start:
callq __start_foo
callq __start_bar
callq __stop_bar
.section foo,"ax"
nop