dl-sysdep.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Various assmbly language/system dependent hacks that are required
  2. so that we can minimize the amount of platform specific code. */
  3. /* Define this if the system uses RELOCA. */
  4. #define ELF_USES_RELOCA
  5. /* Initialization sequence for a GOT. */
  6. #define INIT_GOT(GOT_BASE,MODULE) \
  7. { \
  8. GOT_BASE[2] = (int) _dl_linux_resolve; \
  9. GOT_BASE[1] = (int) (MODULE); \
  10. }
  11. /* Here we define the magic numbers that this dynamic loader should accept */
  12. #define MAGIC1 EM_68K
  13. #undef MAGIC2
  14. /* Used for error messages */
  15. #define ELF_TARGET "m68k"
  16. struct elf_resolve;
  17. extern unsigned int _dl_linux_resolver (int, int, struct elf_resolve *, int);
  18. /* Define this because we do not want to call .udiv in the library.
  19. Not needed for m68k. */
  20. #define do_rem(result, n, base) ((result) = (n) % (base))
  21. /* 4096 bytes alignment */
  22. #define PAGE_ALIGN 0xfffff000
  23. #define ADDR_ALIGN 0xfff
  24. #define OFFS_ALIGN 0x7ffff000
  25. /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
  26. PLT entries should not be allowed to define the value.
  27. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
  28. of the main executable's symbols, as for a COPY reloc. */
  29. #define elf_machine_type_class(type) \
  30. ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
  31. | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY))