aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-10-03 09:11:00 +0200
committerMartin Liska <mliska@suse.cz>2022-10-11 14:13:26 +0200
commit857bddbe737bc963bd9e5a3b24743a9bba5d2d7b (patch)
tree487913f1480b0ace5fa040e07f2b839c9eb00175 /bfd/bfd-in.h
parentc6422d7be70f14bf7140085f2fc7a592737f5df5 (diff)
downloadfsf-binutils-gdb-857bddbe737bc963bd9e5a3b24743a9bba5d2d7b.zip
fsf-binutils-gdb-857bddbe737bc963bd9e5a3b24743a9bba5d2d7b.tar.gz
fsf-binutils-gdb-857bddbe737bc963bd9e5a3b24743a9bba5d2d7b.tar.bz2
refactor usage of compressed_debug_section_type
bfd/ChangeLog: * bfd-in.h (bfd_hash_set_default_size): Add COMPRESS_UNKNOWN enum value. (struct compressed_type_tuple): New. * bfd-in2.h (bfd_hash_set_default_size): Regenerate. (struct compressed_type_tuple): Likewise. * libbfd.c (ARRAY_SIZE): New macro. (bfd_get_compression_algorithm): New function. (bfd_get_compression_algorithm_name): Likewise. gas/ChangeLog: * as.c: Do not special-case, use the new functions. ld/ChangeLog: * emultempl/elf.em: Do not special-case, use the new functions. * lexsup.c (elf_static_list_options): Likewise.
Diffstat (limited to 'bfd/bfd-in.h')
-rw-r--r--bfd/bfd-in.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 4765ea8..82e33d4 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -335,15 +335,23 @@ extern void bfd_hash_traverse
this size. */
extern unsigned long bfd_hash_set_default_size (unsigned long);
-/* Types of compressed DWARF debug sections. We currently support
- zlib. */
+/* Types of compressed DWARF debug sections. */
enum compressed_debug_section_type
{
COMPRESS_DEBUG_NONE = 0,
COMPRESS_DEBUG = 1 << 0,
COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1,
COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2,
- COMPRESS_DEBUG_ZSTD = COMPRESS_DEBUG | 1 << 3
+ COMPRESS_DEBUG_ZSTD = COMPRESS_DEBUG | 1 << 3,
+ COMPRESS_UNKNOWN = 1 << 4
+};
+
+/* Tuple for compressed_debug_section_type and their name. */
+
+struct compressed_type_tuple
+{
+ enum compressed_debug_section_type type;
+ const char *name;
};
/* This structure is used to keep track of stabs in sections
@@ -456,6 +464,12 @@ extern void bfd_free_window
(bfd_window *);
extern bool bfd_get_file_window
(bfd *, file_ptr, bfd_size_type, bfd_window *, bool);
+
+
+extern enum compressed_debug_section_type bfd_get_compression_algorithm
+ (const char *);
+extern const char *bfd_get_compression_algorithm_name
+ (enum compressed_debug_section_type);
/* Externally visible ELF routines. */