From fa38443f8a45c28e5f3176fee00cf21c4499aabb Mon Sep 17 00:00:00 2001 From: AK6DN Date: Mon, 25 Mar 2019 20:17:31 -0700 Subject: [PATCH] sort psect list in .log file in asc addr order instead of name order --- obj2bin.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obj2bin.pl b/obj2bin.pl index d501a91..54a57ab 100644 --- a/obj2bin.pl +++ b/obj2bin.pl @@ -822,7 +822,7 @@ sub parse_rec ($$$) { printf $LOG "..ENDGSD\n\n" if $DEBUG; $program{END}{ADDRESS} = 0; - foreach my $nam (sort(keys(%psect))) { + foreach my $nam (sort({$psect{$a}{START} == $psect{$b}{START} ? $psect{$a}{LENGTH} <=> $psect{$b}{LENGTH} : $psect{$a}{START} <=> $psect{$b}{START}} keys(%psect))) { my $start = $psect{$nam}{START}; my $length = $psect{$nam}{LENGTH}; my $end = $length ? $start + $length - 1 : $start;