this size. */
extern unsigned long bfd_hash_set_default_size (unsigned long);
+/* Types of compressed DWARF debug sections. We currently support
+ zlib. */
+enum compressed_debug_section_type
+{
+ COMPRESS_DEBUG_NONE = 0,
+ COMPRESS_DEBUG = 1 << 0,
+ COMPRESS_DEBUG_ZLIB = COMPRESS_DEBUG | 1 << 1,
+ COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 2,
+ COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 3
+};
+
/* This structure is used to keep track of stabs in sections
information while linking. */
(bfd *);
extern void bfd_elf64_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int);
+ (bfd *, struct bfd_link_info *, int, int, int, int, int);
extern void bfd_elf32_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int);
+ (bfd *, struct bfd_link_info *, int, int, int, int, int);
/* ELF AArch64 mapping symbol support. */
#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
executables or shared objects. This is for COFF only. */
#define SEC_COFF_SHARED 0x8000000
+ /* This section should be compressed. This is for ELF linker
+ internal use only. */
+#define SEC_ELF_COMPRESS 0x8000000
+
/* When a section with this flag is being linked, then if the size of
the input section is less than a page, it should not cross a page
boundary. If the size of the input section is one page or more,
TMS320C54X only. */
#define SEC_TIC54X_BLOCK 0x10000000
+ /* This section should be renamed. This is for ELF linker
+ internal use only. */
+#define SEC_ELF_RENAME 0x10000000
+
/* Conditionally link this section; do not link if there are no
references found to any symbol in the section. This is for TI
TMS320C54X only. */
#define SEC_TIC54X_CLINK 0x20000000
+ /* This section contains vliw code. This is for Toshiba MeP only. */
+#define SEC_MEP_VLIW 0x20000000
+
/* Indicate that section has the no read flag set. This happens
when memory read flag isn't set. */
#define SEC_COFF_NOREAD 0x40000000
ENUM_BITFIELD (bfd_direction) direction : 2;
/* Format_specific flags. */
- flagword flags : 17;
+ flagword flags : 18;
/* Values that may appear in the flags field of a BFD. These also
appear in the object_flags field of the bfd_target structure, where
/* BFD is a dummy, for plugins. */
#define BFD_PLUGIN 0x10000
+ /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */
+#define BFD_COMPRESS_GABI 0x20000
+
/* Flags bits to be saved in bfd_preserve_save. */
#define BFD_FLAGS_SAVED \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN)
+ (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \
+ | BFD_COMPRESS_GABI)
/* Flags bits which are for BFD use only. */
#define BFD_FLAGS_FOR_BFD_USE_MASK \
(BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT)
+ | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
+ | BFD_COMPRESS_GABI)
/* Is the file descriptor being cached? That is, can it be closed as
needed, and re-opened when accessed later? */
/* Set if this is the linker output BFD. */
unsigned int is_linker_output : 1;
+ /* Set if this is the linker input BFD. */
+ unsigned int is_linker_input : 1;
+
/* If this is an input for a compiler plug-in library. */
ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
char *bfd_demangle (bfd *, const char *, int);
+void bfd_update_compression_header
+ (bfd *abfd, bfd_byte *contents, asection *sec);
+
+bfd_boolean bfd_check_compression_header
+ (bfd *abfd, bfd_byte *contents, asection *sec,
+ bfd_size_type uncompressed_size);
+
+int bfd_get_compression_header_size (bfd *abfd, asection *sec);
+
/* Extracted from archive.c. */
symindex bfd_get_next_mapent
(bfd *abfd, symindex previous, carsym **sym);
void bfd_cache_section_contents
(asection *sec, void *contents);
+bfd_boolean bfd_is_section_compressed_with_header
+ (bfd *abfd, asection *section,
+ int *compression_header_size_p);
+
bfd_boolean bfd_is_section_compressed
(bfd *abfd, asection *section);
bfd_boolean bfd_init_section_compress_status
(bfd *abfd, asection *section);
+bfd_boolean bfd_compress_section
+ (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
+
#ifdef __cplusplus
}
#endif