110-elf_compressed_header_support.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. --- a/libelf/libelf.h
  2. +++ b/libelf/libelf.h
  3. @@ -36,6 +36,30 @@
  4. /* Get the ELF types. */
  5. #include <elf.h>
  6. +#ifndef ELFCOMPRESS_ZLIB
  7. +typedef struct
  8. +{
  9. + Elf32_Word ch_type; /* Compression format. */
  10. + Elf32_Word ch_size; /* Uncompressed data size. */
  11. + Elf32_Word ch_addralign; /* Uncompressed data alignment. */
  12. +} Elf32_Chdr;
  13. +
  14. +typedef struct
  15. +{
  16. + Elf64_Word ch_type; /* Compression format. */
  17. + Elf64_Word ch_reserved;
  18. + Elf64_Xword ch_size; /* Uncompressed data size. */
  19. + Elf64_Xword ch_addralign; /* Uncompressed data alignment. */
  20. +} Elf64_Chdr;
  21. +
  22. +/* Legal values for ch_type (compression algorithm). */
  23. +#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */
  24. +#define ELFCOMPRESS_LOOS 0x60000000 /* Start of OS-specific. */
  25. +#define ELFCOMPRESS_HIOS 0x6fffffff /* End of OS-specific. */
  26. +#define ELFCOMPRESS_LOPROC 0x70000000 /* Start of processor-specific. */
  27. +#define ELFCOMPRESS_HIPROC 0x7fffffff /* End of processor-specific. */
  28. +#endif
  29. +
  30. #ifndef _LIBC
  31. #ifndef __mempcpy
  32. #define __mempcpy mempcpy