Skip to content
This repository was archived by the owner on Apr 25, 2021. It is now read-only.

Commit 8c744e8

Browse files
committed
build 스크립트 고침
1 parent 23f9785 commit 8c744e8

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/build.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from dataclasses import dataclass
1010
from elftools.elf.elffile import ELFFile
11-
from elftools.elf.sections import SymbolTableSection, Section, Symbol
11+
from elftools.elf.sections import SymbolTableSection, Symbol
1212

1313
import re
1414

@@ -84,23 +84,8 @@ def pretty_addr(addr: int, size=8) -> str:
8484

8585

8686
def process_elf(elf: ELFFile, map_file: Path):
87-
assert elf.get_machine_arch() == "ARM"
88-
89-
if False:
90-
print(">", "section")
91-
for section_obj in find_section(elf, Section): # type: Section
92-
section = SimpleSection(section_obj.name, **section_obj.header)
93-
if not section.sh_addr:
94-
continue
95-
96-
print(
97-
pretty_addr(section.sh_addr),
98-
pretty_addr(section.sh_size, size=6),
99-
section.sh_flags,
100-
section.sh_type,
101-
section.name,
102-
sep="\t"
103-
)
87+
if elf.get_machine_arch() != "ARM":
88+
raise Exception("Invalid machine arch {} (not ARM)".format(elf.get_machine_arch()))
10489

10590
with map_file.open('w') as fp:
10691
type2typ = {

0 commit comments

Comments
 (0)