Changeset c23502d in mainline for generic/src/lib/elf.c


Ignore:
Timestamp:
2006-03-15T23:54:19Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d5a54f3
Parents:
649799a
Message:

Support only anonymous address space areas.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/lib/elf.c

    r649799a rc23502d  
    156156{
    157157        as_area_t *a;
    158         int i, type = 0;
     158        int i, flags = 0;
    159159        size_t segment_size;
    160160        __u8 *segment;
     
    172172                return EE_MEMORY;
    173173       
    174         if (entry->p_flags & PF_X) {
    175                 type = AS_AREA_TEXT;
    176         } else if (entry->p_flags & PF_W) {
    177                 type = AS_AREA_DATA;
    178         } else {
    179                 return EE_UNSUPPORTED;
    180         }
     174        if (entry->p_flags & PF_X)
     175                flags |= AS_AREA_EXEC;
     176        if (entry->p_flags & PF_W)
     177                flags |= AS_AREA_WRITE;
     178        if (entry->p_flags & PF_R)
     179                flags |= AS_AREA_READ;
    181180
    182181        /*
     
    195194                segment = ((void *) elf) + entry->p_offset;
    196195
    197         a = as_area_create(as, type, SIZE2FRAMES(entry->p_memsz), entry->p_vaddr);
     196        a = as_area_create(as, flags, SIZE2FRAMES(entry->p_memsz), entry->p_vaddr);
    198197        if (!a)
    199198                return EE_IRRECOVERABLE;
Note: See TracChangeset for help on using the changeset viewer.