Commit c898381059b0ffee9d14e7cb634226a3b3ec8d2c
authornnayo <yann_gouy@yahoo.fr>
Wed, 12 Feb 2014 10:14:51 +0000 (11:14 +0100)
committernnayo <yann_gouy@yahoo.fr>
Wed, 12 Feb 2014 10:14:51 +0000 (11:14 +0100)
simavr/sim/sim_elf.c

index 68fe2e2c685c3aebd9c12cce0d478395f24b68b5..a0a49eeac3280f15c9234925981d2fcb3c297a93 100644 (file)
@@ -57,7 +57,7 @@ void avr_load_firmware(avr_t * avr, elf_firmware_t * firmware)
        memset(avr->trace_data->codeline, 0, scount * sizeof(avr_symbol_t*));
 
        for (int i = 0; i < firmware->symbolcount; i++)
-               if (!(firmware->symbol[i]->addr >> 20)) // code address
+               if (firmware->symbol[i]->addr < firmware->flashsize)    // code address
                        avr->trace_data->codeline[firmware->symbol[i]->addr >> 1] =
                                firmware->symbol[i];
        // "spread" the pointers for known symbols forward