(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_x86_segbases
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_i386_tls
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_ppc_vmx
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_ppc_vsx
#include CORE_HEADER
#endif
+/* Name of a pseudo-section which represents NT_386_TLS notes within a core
+ file. */
+#define PSEUDO_SECTION_NAME_I386_TLS ".reg-i386-tls"
+
static int elf_sort_sections (const void *, const void *);
static bool assign_file_positions_except_relocs (bfd *, struct bfd_link_info *);
static bool swap_out_syms (bfd *, struct elf_strtab_hash **, int,
return elfcore_make_note_pseudosection (abfd, ".gdb-tdesc", note);
}
+static bool
+elfcore_grok_i386_tls (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, PSEUDO_SECTION_NAME_I386_TLS,
+ note);
+}
+
static bool
elfcore_grok_loongarch_cpucfg (bfd *abfd, Elf_Internal_Note *note)
{
else
return true;
+ case NT_386_TLS:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_i386_tls (abfd, note);
+ else
+ return true;
+
case NT_ARM_HW_BREAK:
if (note->namesz == 6
&& strcmp (note->namedata, "LINUX") == 0)
note_name, NT_FREEBSD_X86_SEGBASES, regs, size);
}
+char *
+elfcore_write_i386_tls (bfd *abfd, char *buf, int *bufsiz,
+ const void *regs, int size)
+{
+ return elfcore_write_note (abfd, buf, bufsiz, "LINUX", NT_386_TLS,
+ regs, size);
+}
+
char *
elfcore_write_ppc_vmx (bfd *abfd,
char *buf,
return elfcore_write_loongarch_lsx (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-loongarch-lasx") == 0)
return elfcore_write_loongarch_lasx (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, PSEUDO_SECTION_NAME_I386_TLS) == 0)
+ return elfcore_write_i386_tls (abfd, buf, bufsiz, data, size);
return NULL;
}