diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/NEWS | 16 | ||||
-rw-r--r-- | binutils/dwarf.c | 26 | ||||
-rw-r--r-- | binutils/dwarf.h | 6 | ||||
-rw-r--r-- | binutils/objdump.c | 4 | ||||
-rw-r--r-- | binutils/readelf.c | 11 |
5 files changed, 51 insertions, 12 deletions
diff --git a/binutils/NEWS b/binutils/NEWS index 0635687..89351d7 100644 --- a/binutils/NEWS +++ b/binutils/NEWS @@ -1,5 +1,17 @@ -*- text -*- +* New versioned release of libsframe: libsframe.so.2. This release introduces + versioned symbols with version node name LIBSFRAME_2.0. Some new symbols + have been added to support the new flag SFRAME_F_FDE_FUNC_START_PCREL and + retrieving flags from SFrame decoder and encoder objects: + - Addition of sframe_decoder_get_flags, + sframe_decoder_get_offsetof_fde_start_addr, sframe_encoder_get_flags, + sframe_encoder_get_offsetof_fde_start_addr. + This release also includes backward-incompatible ABI changes: + - Removal of sframe_get_funcdesc_with_addr. + - Change in the behavior of sframe_decoder_get_funcdesc_v2, + sframe_encoder_add_funcdesc_v2 and sframe_encoder_write. + * On s390 64-bit (s390x), gas, ld, objdump, and readelf now support generating and processing SFrame V2 stack trace information (.sframe). The assembler generates SFrame info from CFI directives with option "--gsframe". The @@ -24,6 +36,10 @@ * For RISC-V dis-assembler, the definition of mapping symbol $x is changed, so the file needs to be rebuilt since 2.45 once used .option arch directives. +* The LoongArch disassembler now properly accepts multiple disassembly + options given by -M, such as "-M no-aliases,numeric". (Previously only the + first option took effect.) + Changes in 2.44: * Support for Nios II targets has been removed except in the readelf utility, diff --git a/binutils/dwarf.c b/binutils/dwarf.c index e0e202f..f4bcb67 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -8582,6 +8582,8 @@ typedef struct Frame_Chunk } Frame_Chunk; +typedef bool (*is_mach_augmentation_ftype) (char c); +static is_mach_augmentation_ftype is_mach_augmentation; typedef const char *(*dwarf_regname_lookup_ftype) (unsigned int); static dwarf_regname_lookup_ftype dwarf_regnames_lookup_func; static const char *const *dwarf_regnames; @@ -8894,9 +8896,22 @@ init_dwarf_regnames_loongarch (void) dwarf_regnames_lookup_func = regname_internal_by_table_only; } +static bool +is_nomach_augmentation (char c ATTRIBUTE_UNUSED) +{ + return false; +} + +static bool +is_aarch64_augmentation (char c) +{ + return (c == 'B' || c == 'G'); +} + void -init_dwarf_regnames_by_elf_machine_code (unsigned int e_machine) +init_dwarf_by_elf_machine_code (unsigned int e_machine) { + is_mach_augmentation = is_nomach_augmentation; dwarf_regnames_lookup_func = NULL; is_aarch64 = false; @@ -8918,6 +8933,7 @@ init_dwarf_regnames_by_elf_machine_code (unsigned int e_machine) case EM_AARCH64: init_dwarf_regnames_aarch64 (); + is_mach_augmentation = is_aarch64_augmentation; break; case EM_S390: @@ -8941,9 +8957,10 @@ init_dwarf_regnames_by_elf_machine_code (unsigned int e_machine) architecture and specific machine type of a BFD. */ void -init_dwarf_regnames_by_bfd_arch_and_mach (enum bfd_architecture arch, - unsigned long mach) +init_dwarf_by_bfd_arch_and_mach (enum bfd_architecture arch, + unsigned long mach) { + is_mach_augmentation = is_nomach_augmentation; dwarf_regnames_lookup_func = NULL; is_aarch64 = false; @@ -8971,6 +8988,7 @@ init_dwarf_regnames_by_bfd_arch_and_mach (enum bfd_architecture arch, case bfd_arch_aarch64: init_dwarf_regnames_aarch64(); + is_mach_augmentation = is_aarch64_augmentation; break; case bfd_arch_s390: @@ -9216,7 +9234,7 @@ read_cie (unsigned char *start, unsigned char *end, fc->fde_encoding = *q++; else if (*p == 'S') ; - else if (*p == 'B') + else if (is_mach_augmentation (*p)) ; else break; diff --git a/binutils/dwarf.h b/binutils/dwarf.h index 6f693b1..13afb4a 100644 --- a/binutils/dwarf.h +++ b/binutils/dwarf.h @@ -241,9 +241,9 @@ extern unsigned long dwarf_start_die; extern int dwarf_check; -extern void init_dwarf_regnames_by_elf_machine_code (unsigned int); -extern void init_dwarf_regnames_by_bfd_arch_and_mach (enum bfd_architecture arch, - unsigned long mach); +extern void init_dwarf_by_elf_machine_code (unsigned int); +extern void init_dwarf_by_bfd_arch_and_mach (enum bfd_architecture arch, + unsigned long mach); extern bool load_debug_section (enum dwarf_section_display_enum, void *); extern void free_debug_section (enum dwarf_section_display_enum); diff --git a/binutils/objdump.c b/binutils/objdump.c index 7bb6d76..98d3049 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -4551,8 +4551,8 @@ dump_dwarf (bfd *abfd, bool is_mainfile) break; } - init_dwarf_regnames_by_bfd_arch_and_mach (bfd_get_arch (abfd), - bfd_get_mach (abfd)); + init_dwarf_by_bfd_arch_and_mach (bfd_get_arch (abfd), + bfd_get_mach (abfd)); bfd_map_over_sections (abfd, dump_dwarf_section, (void *) &is_mainfile); } diff --git a/binutils/readelf.c b/binutils/readelf.c index 5730247..cfccdd2 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -2584,9 +2584,12 @@ get_aarch64_dynamic_type (unsigned long type) { switch (type) { - case DT_AARCH64_BTI_PLT: return "AARCH64_BTI_PLT"; - case DT_AARCH64_PAC_PLT: return "AARCH64_PAC_PLT"; + case DT_AARCH64_BTI_PLT: return "AARCH64_BTI_PLT"; + case DT_AARCH64_PAC_PLT: return "AARCH64_PAC_PLT"; case DT_AARCH64_VARIANT_PCS: return "AARCH64_VARIANT_PCS"; + case DT_AARCH64_MEMTAG_MODE: return "AARCH64_MEMTAG_MODE"; + case DT_AARCH64_MEMTAG_STACK: return "AARCH64_MEMTAG_STACK"; + default: return NULL; } @@ -5964,6 +5967,7 @@ get_os_specific_section_type_name (Filedata * filedata, unsigned int sh_type) case SHT_GNU_HASH: return "GNU_HASH"; case SHT_GNU_LIBLIST: return "GNU_LIBLIST"; case SHT_GNU_OBJECT_ONLY: return "GNU_OBJECT_ONLY"; + case SHT_GNU_SFRAME: return "GNU_SFRAME"; case SHT_SUNW_move: return "SUNW_MOVE"; case SHT_SUNW_COMDAT: return "SUNW_COMDAT"; @@ -6827,7 +6831,7 @@ process_file_header (Filedata * filedata) return false; if (! filedata->is_separate) - init_dwarf_regnames_by_elf_machine_code (header->e_machine); + init_dwarf_by_elf_machine_code (header->e_machine); if (do_header) { @@ -8367,6 +8371,7 @@ process_section_headers (Filedata * filedata) case SHT_NOTE: case SHT_PROGBITS: + case SHT_GNU_SFRAME: /* Having a zero sized section is not illegal according to the ELF standard, but it might be an indication that something is wrong. So issue a warning if we are running in lint mode. */ |