break;
}
if (idx < shnum)
- dest->shdr = elf_elfsections (abfd)[idx];
+ {
+ dest->shdr = elf_elfsections (abfd)[idx];
+ /* PR binutils/23199: All sections in a
+ section group should be marked with
+ SHF_GROUP. But some tools generate
+ broken objects without SHF_GROUP. Fix
+ them up here. */
+ dest->shdr->sh_flags |= SHF_GROUP;
+ }
if (idx >= shnum
|| dest->shdr->sh_type == SHT_GROUP)
{
if (vernum == 0)
version_string = "";
- else if (vernum == 1)
+ else if (vernum == 1
+ && (vernum > elf_tdata (abfd)->cverdefs
+ || (elf_tdata (abfd)->verdef[0].vd_flags
+ == VER_FLG_BASE)))
version_string = "Base";
else if (vernum <= elf_tdata (abfd)->cverdefs)
version_string =
return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-watch", note);
}
+static bfd_boolean
+elfcore_grok_aarch_sve (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-aarch-sve", note);
+}
+
#if defined (HAVE_PRPSINFO_T)
typedef prpsinfo_t elfcore_psinfo_t;
#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
else
return TRUE;
+ case NT_ARM_SVE:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_aarch_sve (abfd, note);
+ else
+ return TRUE;
+
case NT_PRPSINFO:
case NT_PSINFO:
if (bed->elf_backend_grok_psinfo)
note_name, NT_ARM_HW_WATCH, aarch_hw_watch, size);
}
+char *
+elfcore_write_aarch_sve (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *aarch_sve,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_SVE, aarch_sve, size);
+}
+
char *
elfcore_write_register_note (bfd *abfd,
char *buf,
return elfcore_write_aarch_hw_break (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-aarch-hw-watch") == 0)
return elfcore_write_aarch_hw_watch (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-aarch-sve") == 0)
+ return elfcore_write_aarch_sve (abfd, buf, bufsiz, data, size);
return NULL;
}