projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
disassembler: Add new call/ret
[b43-tools.git]
/
disassembler
/
brcm80211fwconv
diff --git
a/disassembler/brcm80211fwconv
b/disassembler/brcm80211fwconv
index 880abb5d14d11e87cbc9199e231261774546ed49..092c043cfac4e3f06bc985dc282f6eac9df93b0f 100755
(executable)
--- a/
disassembler/brcm80211fwconv
+++ b/
disassembler/brcm80211fwconv
@@
-161,9
+161,14
@@
def mergeSection(hdr_filepath, bin_filepath, mergeIndex, mergefilePath):
newBin = []
newSections = []
newOffset = 0
newBin = []
newSections = []
newOffset = 0
+ foundIt = False
for section in sections:
(offset, length, index) = section
if index == mergeIndex:
for section in sections:
(offset, length, index) = section
if index == mergeIndex:
+ if foundIt:
+ print "Confused. Multiple sections with index %d?" % index
+ return 1
+ foundIt = True
# We overwrite this section
newBin.append(merge_data)
newSections.append( (newOffset, len(merge_data), index) )
# We overwrite this section
newBin.append(merge_data)
newSections.append( (newOffset, len(merge_data), index) )
@@
-176,6
+181,9
@@
def mergeSection(hdr_filepath, bin_filepath, mergeIndex, mergefilePath):
return 1
newSections.append( (newOffset, length, index) )
newOffset += length
return 1
newSections.append( (newOffset, length, index) )
newOffset += length
+ if not foundIt:
+ print "Did not find section with index %d" % mergeIndex
+ return 1
newBin = "".join(newBin)
newHdr = generateHeaderData(newSections)
try:
newBin = "".join(newBin)
newHdr = generateHeaderData(newSections)
try: