~vcs-imports/qemu/maemo

« back to all changes in this revision

Viewing changes to elf_ops.h

  • Committer: Riku Voipio
  • Date: 2009-06-08 15:31:58 UTC
  • mfrom: (6281.2.366)
  • mto: This revision was merged to the branch mainline in revision 6452.
  • Revision ID: git-v1:759b334a9739814df2883aa4c41b1c0f5670e90a
Merge commit 'gnu/master' into test

Epic merge

Conflicts:
        Makefile
        block.c
        block.h
        configure
        hw/boards.h
        hw/flash.h
        hw/integratorcp.c
        hw/nand.c
        hw/omap2.c
        hw/omap_i2c.c
        hw/sd.c
        hw/smc91c111.c
        hw/tsc2005.c
        hw/tusb6010.c
        hw/usb-musb.c
        linux-user/syscall.c
        target-arm/machine.c
        target-arm/translate.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
    struct elf_phdr *phdr = NULL, *ph;
186
186
    int size, i, total_size;
187
187
    elf_word mem_size;
188
 
    uint64_t addr, low = 0, high = 0;
 
188
    uint64_t addr, low = (uint64_t)-1, high = 0;
189
189
    uint8_t *data = NULL;
190
190
 
191
191
    if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
249
249
            cpu_physical_memory_write_rom(addr, data, mem_size);
250
250
 
251
251
            total_size += mem_size;
252
 
            if (!low || addr < low)
 
252
            if (addr < low)
253
253
                low = addr;
254
 
            if (!high || (addr + mem_size) > high)
 
254
            if ((addr + mem_size) > high)
255
255
                high = addr + mem_size;
256
256
 
257
257
            qemu_free(data);