blob: fd0c4903bb981af9845ca57c4d8e0f6077fdfb93 [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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
Paul Menzela46a7122013-02-23 18:37:27 +010017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Uwe Hermann7eb845e2008-11-02 17:01:06 +000018 */
19
20#ifndef SELF_H_
21#define SELF_H_
22
23struct self_segment {
24 u32 type;
25 u32 offset;
26 u64 load_addr;
27 u32 len;
28 u32 mem_len;
29};
30
31#define SELF_TYPE_CODE 0x45444F43
32#define SELF_TYPE_DATA 0x41544144
33#define SELF_TYPE_BSS 0x20535342
34#define SELF_TYPE_PARAMS 0x41524150
35#define SELF_TYPE_ENTRY 0x52544E45
36
37int elf_to_self(const char *filename, unsigned char **buffer,
38 void (*compress) (char *, int, char *, int *));
39
40int iself(char *filename);
41
42#endif