flat.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (C) 2002-2003 David McCullough <davidm@snapgear.com>
  3. * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>
  4. * The Silver Hammer Group, Ltd.
  5. *
  6. * This file provides the definitions and structures needed to
  7. * support uClinux flat-format executables.
  8. */
  9. #ifndef _LINUX_FLAT_H
  10. #define _LINUX_FLAT_H
  11. #include <asm/flat.h>
  12. #include <uapi/linux/flat.h>
  13. /*
  14. * While it would be nice to keep this header clean, users of older
  15. * tools still need this support in the kernel. So this section is
  16. * purely for compatibility with old tool chains.
  17. *
  18. * DO NOT make changes or enhancements to the old format please, just work
  19. * with the format above, except to fix bugs with old format support.
  20. */
  21. #include <asm/byteorder.h>
  22. #define OLD_FLAT_VERSION 0x00000002L
  23. #define OLD_FLAT_RELOC_TYPE_TEXT 0
  24. #define OLD_FLAT_RELOC_TYPE_DATA 1
  25. #define OLD_FLAT_RELOC_TYPE_BSS 2
  26. typedef union {
  27. unsigned long value;
  28. struct {
  29. # if defined(mc68000) && !defined(CONFIG_COLDFIRE)
  30. signed long offset : 30;
  31. unsigned long type : 2;
  32. # define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */
  33. # elif defined(__BIG_ENDIAN_BITFIELD)
  34. unsigned long type : 2;
  35. signed long offset : 30;
  36. # define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */
  37. # elif defined(__LITTLE_ENDIAN_BITFIELD)
  38. signed long offset : 30;
  39. unsigned long type : 2;
  40. # define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */
  41. # else
  42. # error "Unknown bitfield order for flat files."
  43. # endif
  44. } reloc;
  45. } flat_v2_reloc_t;
  46. #endif /* _LINUX_FLAT_H */