return res;
}
+static const char *
+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";
+ default:
+ return NULL;
+ }
+}
+
static const char *
get_mips_dynamic_type (unsigned long type)
{
switch (filedata->file_header.e_machine)
{
+ case EM_AARCH64:
+ result = get_aarch64_dynamic_type (type);
+ break;
case EM_MIPS:
case EM_MIPS_RS3_LE:
result = get_mips_dynamic_type (type);
return TRUE;
}
+static void
+dynamic_section_aarch64_val (Elf_Internal_Dyn * entry)
+{
+ switch (entry->d_tag)
+ {
+ case DT_AARCH64_BTI_PLT:
+ case DT_AARCH64_PAC_PLT:
+ break;
+ default:
+ print_vma (entry->d_un.d_ptr, PREFIX_HEX);
+ break;
+ }
+ putchar ('\n');
+}
+
static void
dynamic_section_mips_val (Elf_Internal_Dyn * entry)
{
{
switch (filedata->file_header.e_machine)
{
+ case EM_AARCH64:
+ dynamic_section_aarch64_val (entry);
+ break;
case EM_MIPS:
case EM_MIPS_RS3_LE:
dynamic_section_mips_val (entry);
}
}
+static void
+decode_aarch64_feature_1_and (unsigned int bitmask)
+{
+ while (bitmask)
+ {
+ unsigned int bit = bitmask & (- bitmask);
+
+ bitmask &= ~ bit;
+ switch (bit)
+ {
+ case GNU_PROPERTY_AARCH64_FEATURE_1_BTI:
+ printf ("BTI");
+ break;
+
+ case GNU_PROPERTY_AARCH64_FEATURE_1_PAC:
+ printf ("PAC");
+ break;
+
+ default:
+ printf (_("<unknown: %x>"), bit);
+ break;
+ }
+ if (bitmask)
+ printf (", ");
+ }
+}
+
static void
print_gnu_property_note (Filedata * filedata, Elf_Internal_Note * pnote)
{
break;
}
}
+ else if (filedata->file_header.e_machine == EM_AARCH64)
+ {
+ if (type == GNU_PROPERTY_AARCH64_FEATURE_1_AND)
+ {
+ printf ("AArch64 feature: ");
+ if (datasz != 4)
+ printf (_("<corrupt length: %#x> "), datasz);
+ else
+ decode_aarch64_feature_1_and (byte_get (ptr, 4));
+ goto next;
+ }
+ }
}
else
{
static bfd_boolean
process_object (Filedata * filedata)
{
- Filedata * separates;
+ bfd_boolean have_separate_files;
unsigned int i;
bfd_boolean res = TRUE;
res = FALSE;
if (filedata->file_header.e_shstrndx != SHN_UNDEF)
- separates = load_separate_debug_file (filedata, filedata->file_name);
+ have_separate_files = load_separate_debug_files (filedata, filedata->file_name);
else
- separates = NULL;
+ have_separate_files = FALSE;
if (! process_section_contents (filedata))
res = FALSE;
- if (separates)
+ if (have_separate_files)
{
- if (! process_section_headers (separates))
- res = FALSE;
- else if (! process_section_contents (separates))
- res = FALSE;
+ separate_info * d;
+
+ for (d = first_separate_info; d != NULL; d = d->next)
+ {
+ if (! process_section_headers (d->handle))
+ res = FALSE;
+ else if (! process_section_contents (d->handle))
+ res = FALSE;
+ }
+
+ /* The file handles are closed by the call to free_debug_memory() below. */
}
if (! process_notes (filedata))