Skip to content

Commit 4db3474

Browse files
committed
Some comments and spelling.
1 parent b4f0bb7 commit 4db3474

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

extract-bc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ constituent ELF or MACH-O objects and read their bitcode sections and
1212
create a LLVM Bitcode archive from the bitcode files.
1313
1414
The above language is deliberately vague, since ELF contains a
15-
.llvm_bc section, whereas the MACH-O contains a segement called __LLVM
15+
.llvm_bc section, whereas the MACH-O contains a segment called __LLVM
1616
that contains a section called __llvm_bc.
1717
1818
"""
@@ -96,7 +96,8 @@ def getSectionContent(size, offset, filename):
9696
# nulls.
9797
return d.replace('\0', '')
9898

99-
#use otool to insert the segment and section
99+
# os independent abstraction (darwin version)
100+
#use otool to extract the segment and section
100101
#iam: "xxd -r" would just refuse to play nice, so it got tossed.
101102
# if any one can get
102103
# otool -X -s __LLVM __llvm_bc inputFile | xxd -r
@@ -122,7 +123,8 @@ def extract_section_darwin(inputFile):
122123
logging.error('{0} contained no {1} segment'.format(inputFile, darwinSegmentName))
123124
return contents
124125

125-
#analagous procedure for linux (relying on objcopy)
126+
# os independent abstraction (*nix version)
127+
#analagous procedure for linux (relying on getSectionSizeAndOffset and getSectionContent)
126128
def extract_section_linux(inputFile):
127129
(sectionSize, sectionOffset) = getSectionSizeAndOffset(elfSectionName, inputFile)
128130
content = getSectionContent(sectionSize, sectionOffset, inputFile)

0 commit comments

Comments
 (0)