2 * include/asm-blackfin/flat.h -- uClinux flat-format executables
8 #ifndef __BLACKFIN_FLAT_H__
9 #define __BLACKFIN_FLAT_H__
11 #include <asm/unaligned.h>
13 #define flat_argvp_envp_on_stack() 0
14 #define flat_old_ram_flag(flags) (flags)
16 extern unsigned long bfin_get_addr_from_rp (unsigned long *ptr
,
19 unsigned long *persistent
);
21 extern void bfin_put_addr_at_rp(unsigned long *ptr
, unsigned long addr
,
22 unsigned long relval
);
24 /* The amount by which a relocation can exceed the program image limits
25 without being regarded as an error. */
27 #define flat_reloc_valid(reloc, size) ((reloc) <= (size))
29 #define flat_get_addr_from_rp(rp, relval, flags, persistent) \
30 bfin_get_addr_from_rp(rp, relval, flags, persistent)
31 #define flat_put_addr_at_rp(rp, val, relval) \
32 bfin_put_addr_at_rp(rp, val, relval)
34 /* Convert a relocation entry into an address. */
35 static inline unsigned long
36 flat_get_relocate_addr (unsigned long relval
)
38 return relval
& 0x03ffffff; /* Mask out top 6 bits */
41 static inline int flat_set_persistent(unsigned long relval
,
42 unsigned long *persistent
)
44 int type
= (relval
>> 26) & 7;
46 *persistent
= relval
<< 16;
52 static inline int flat_addr_absolute(unsigned long relval
)
54 return (relval
& (1 << 29)) != 0;
57 #endif /* __BLACKFIN_FLAT_H__ */