blob: 4532c64a537156474e9a9dbd4885de5caf786562 [file] [log] [blame]
Uwe Hermann7eb845e2008-11-02 17:01:06 +00001/*
2 * This file is part of the bayou project.
3 *
4 * Copyright (C) 2008 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Uwe Hermann7eb845e2008-11-02 17:01:06 +000014 */
15
16#ifndef SELF_H_
17#define SELF_H_
18
19struct self_segment {
20 u32 type;
21 u32 offset;
22 u64 load_addr;
23 u32 len;
24 u32 mem_len;
25};
26
27#define SELF_TYPE_CODE 0x45444F43
28#define SELF_TYPE_DATA 0x41544144
29#define SELF_TYPE_BSS 0x20535342
30#define SELF_TYPE_PARAMS 0x41524150
31#define SELF_TYPE_ENTRY 0x52544E45
32
33int elf_to_self(const char *filename, unsigned char **buffer,
34 void (*compress) (char *, int, char *, int *));
35
36int iself(char *filename);
37
38#endif