metasm/encode.rb in metasm-1.0.2 vs metasm/encode.rb in metasm-1.0.3

- old
+ new

@@ -40,11 +40,11 @@ edata = (ary.length > 1) ? assemble_resolve(ary) : ary.shift edata.fixup edata.binding edata end - # chose among multiple possible sub-EncodedData + # choose among multiple possible sub-EncodedData # assumes all ambiguous edata have the equivallent relocations in the same order def assemble_resolve(ary) startlabel = new_label('section_start') # create two bindings where all elements are the shortest/longest possible @@ -165,10 +165,10 @@ # now we can resolve all relocations # for linear expressions of internal variables (ie differences of labels from the ary): # - calc target numeric bounds, and reject relocs not accepting worst case value # - else reject all but largest place available - # then chose the shortest overall EData left + # then choose the shortest overall EData left ary.map! { |elem| case elem when Array # for each external, compute numeric target values using minbinding[external] and maxbinding[external] # this gives us all extrem values for linear expressions