Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 08c9f7d in mainline


Ignore:
Timestamp:
2009-06-16T20:09:52Z (13 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master
Children:
0471786
Parents:
a624cbfd
Message:

Suppress warnings in loader.

Location:
uspace/srv/loader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/loader/arch/ia32/ia32.s

    ra624cbfd r08c9f7d  
    4747        pop %ebp
    4848
    49         jmp %eax
     49        jmp *%eax
  • uspace/srv/loader/elf_load.c

    ra624cbfd r08c9f7d  
    7575
    7676/** Read until the buffer is read in its entirety. */
    77 static int my_read(int fd, char *buf, size_t len)
     77static int my_read(int fd, void *buf, size_t len)
    7878{
    7979        int cnt = 0;
     
    332332        uintptr_t bias;
    333333        uintptr_t base;
     334        void *seg_ptr;
     335        uintptr_t seg_addr;
    334336        size_t mem_sz;
    335337        int rc;
    336338
    337         DPRINTF("Load segment at addr 0x%x, size 0x%x\n", entry->p_vaddr,
    338                 entry->p_memsz);
    339        
    340339        bias = elf->bias;
     340
     341        seg_addr = entry->p_vaddr + bias;
     342        seg_ptr = (void *) seg_addr;
     343
     344        DPRINTF("Load segment at addr 0x%x, size 0x%x\n", seg_addr,
     345                entry->p_memsz);       
    341346
    342347        if (entry->p_align > 1) {
    343348                if ((entry->p_offset % entry->p_align) !=
    344                     (entry->p_vaddr % entry->p_align)) {
     349                    (seg_addr % entry->p_align)) {
    345350                        DPRINTF("Align check 1 failed offset%%align=%d, "
    346351                            "vaddr%%align=%d\n",
    347352                            entry->p_offset % entry->p_align,
    348                             entry->p_vaddr % entry->p_align
     353                            seg_addr % entry->p_align
    349354                        );
    350355                        return EE_INVALID;
     
    365370        mem_sz = entry->p_memsz + (entry->p_vaddr - base);
    366371
    367         DPRINTF("Map to p_vaddr=0x%x-0x%x.\n", entry->p_vaddr + bias,
     372        DPRINTF("Map to seg_addr=0x%x-0x%x.\n", seg_addr,
    368373        entry->p_vaddr + bias + ALIGN_UP(entry->p_memsz, PAGE_SIZE));
    369374
     
    380385
    381386        DPRINTF("as_area_create(0x%lx, 0x%x, %d) -> 0x%lx\n",
    382                 entry->p_vaddr+bias, entry->p_memsz, flags, (uintptr_t)a);
     387                base + bias, mem_sz, flags, (uintptr_t)a);
    383388
    384389        /*
     
    400405
    401406        left = entry->p_filesz;
    402         dp = (uint8_t *)(entry->p_vaddr + bias);
     407        dp = seg_ptr;
    403408
    404409        while (left > 0) {
     
    417422        }
    418423
    419         rc = as_area_change_flags((uint8_t *)entry->p_vaddr + bias, flags);
     424        rc = as_area_change_flags(seg_ptr, flags);
    420425        if (rc != 0) {
    421426                DPRINTF("Failed to set memory area flags.\n");
     
    425430        if (flags & AS_AREA_EXEC) {
    426431                /* Enforce SMC coherence for the segment */
    427                 if (smc_coherence(entry->p_vaddr + bias, entry->p_filesz))
     432                if (smc_coherence(seg_ptr, entry->p_filesz))
    428433                        return EE_MEMORY;
    429434        }
  • uspace/srv/loader/main.c

    ra624cbfd r08c9f7d  
    8080static int filc = 0;
    8181/** Preset files vector */
    82 static char **filv = NULL;
     82static fdi_node_t **filv = NULL;
    8383/** Buffer holding all preset files */
    8484static fdi_node_t *fil_buf = NULL;
Note: See TracChangeset for help on using the changeset viewer.