GEL  0.99
prog.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * This file is part of the GEL library.
5  * Copyright (c) 2005-07, IRIT- UPS
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef GEL_PHDR_H
22 #define GEL_PHDR_H
23 
24 #include <gel/common.h>
25 #include <gel/types.h>
26 #include <gel/file.h>
27 #include <gel/cursor.h>
28 
30 
36 typedef struct {
47 
48 
55 
56 
61 typedef struct gel_note_t {
63  char *name;
66  size_t size;
67  int aligned;
69 
70 
71 /* Primitives */
73 void gel_kill_prog(gel_prog_t *s);
74 #define gel_note_desc(c) ((c)->desc)
75 void gel_note_destroy(gel_note_t *curs);
76 int gel_note_init(gel_prog_t *phdr, gel_note_t *curs);
77 #define gel_note_name(c) ((c)->name)
78 int gel_note_next(gel_note_t *curs);
79 #define gel_note_size(c) ((c)->desc.size)
80 #define gel_note_type(c) ((c)->type)
82 int gel_prog_load(gel_prog_t *p, raddr_t addr);
84 
86 
87 #endif /* PHDR_H */
#define __END_DECLS
Definition: common.h:29
#define __BEGIN_DECLS
Definition: common.h:28
int gel_prog2cursor(gel_prog_t *p, gel_cursor_t *c)
Definition: gel_cursor.c:61
int gel_note_next(gel_note_t *curs)
Definition: prog.c:119
gel_prog_t * gel_getprogbyidx(gel_file_t *e, u16_t idx)
Definition: prog.c:387
int gel_note_init(gel_prog_t *phdr, gel_note_t *curs)
Definition: prog.c:63
struct gel_note_t gel_note_t
int gel_prog_load(gel_prog_t *p, raddr_t addr)
Definition: prog.c:307
gel_prog_info_t gel_prog_t
Definition: prog.h:54
void gel_note_destroy(gel_note_t *curs)
Definition: prog.c:106
int gel_prog_infos(gel_prog_t *s, gel_prog_info_t *pi)
Definition: prog.c:453
void gel_kill_prog(gel_prog_t *s)
Definition: prog.c:368
Definition: cursor.h:32
Definition: file.h:31
Definition: prog.h:61
gel_cursor_t desc
Definition: prog.h:65
gel_cursor_t cur
Definition: prog.h:62
char * name
Definition: prog.h:63
u32_t type
Definition: prog.h:64
size_t size
Definition: prog.h:66
int aligned
Definition: prog.h:67
Definition: prog.h:36
u32_t type
Definition: prog.h:38
u32_t flags
Definition: prog.h:43
gel_file_t * container
Definition: prog.h:37
vaddr_t vaddr
Definition: prog.h:40
u32_t filesz
Definition: prog.h:44
vaddr_t paddr
Definition: prog.h:41
u32_t offset
Definition: prog.h:39
u32_t memsz
Definition: prog.h:42
u32_t align
Definition: prog.h:45
__BEGIN_DECLS typedef uint16_t u16_t
Definition: types.h:30
uint32_t u32_t
Definition: types.h:32
uint32_t vaddr_t
Definition: types.h:36
void * raddr_t
Definition: types.h:37