diff options
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index bbdb03a..824354a 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -34,11 +34,6 @@ #include "opcode/i386.h" #include "elf/x86-64.h" -#ifdef CORE_HEADER -#include <stdarg.h> -#include CORE_HEADER -#endif - /* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */ #define MINUS_ONE (~ (bfd_vma) 0) @@ -436,94 +431,6 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) return TRUE; } - -#ifdef CORE_HEADER -static char * -elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz, - int note_type, ...) -{ - const struct elf_backend_data *bed = get_elf_backend_data (abfd); - va_list ap; - const char *fname, *psargs; - long pid; - int cursig; - const void *gregs; - - switch (note_type) - { - default: - return NULL; - - case NT_PRPSINFO: - va_start (ap, note_type); - fname = va_arg (ap, const char *); - psargs = va_arg (ap, const char *); - va_end (ap); - - if (bed->s->elfclass == ELFCLASS32) - { - prpsinfo32_t data; - memset (&data, 0, sizeof (data)); - strncpy (data.pr_fname, fname, sizeof (data.pr_fname)); - strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs)); - return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type, - &data, sizeof (data)); - } - else - { - prpsinfo64_t data; - memset (&data, 0, sizeof (data)); - strncpy (data.pr_fname, fname, sizeof (data.pr_fname)); - strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs)); - return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type, - &data, sizeof (data)); - } - /* NOTREACHED */ - - case NT_PRSTATUS: - va_start (ap, note_type); - pid = va_arg (ap, long); - cursig = va_arg (ap, int); - gregs = va_arg (ap, const void *); - va_end (ap); - - if (bed->s->elfclass == ELFCLASS32) - { - if (bed->elf_machine_code == EM_X86_64) - { - prstatusx32_t prstat; - memset (&prstat, 0, sizeof (prstat)); - prstat.pr_pid = pid; - prstat.pr_cursig = cursig; - memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg)); - return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type, - &prstat, sizeof (prstat)); - } - else - { - prstatus32_t prstat; - memset (&prstat, 0, sizeof (prstat)); - prstat.pr_pid = pid; - prstat.pr_cursig = cursig; - memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg)); - return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type, - &prstat, sizeof (prstat)); - } - } - else - { - prstatus64_t prstat; - memset (&prstat, 0, sizeof (prstat)); - prstat.pr_pid = pid; - prstat.pr_cursig = cursig; - memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg)); - return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type, - &prstat, sizeof (prstat)); - } - } - /* NOTREACHED */ -} -#endif /* Functions for the x86-64 ELF linker. */ @@ -6359,9 +6266,6 @@ static const struct bfd_elf_special_section #define elf_backend_gc_sweep_hook elf_x86_64_gc_sweep_hook #define elf_backend_grok_prstatus elf_x86_64_grok_prstatus #define elf_backend_grok_psinfo elf_x86_64_grok_psinfo -#ifdef CORE_HEADER -#define elf_backend_write_core_note elf_x86_64_write_core_note -#endif #define elf_backend_reloc_type_class elf_x86_64_reloc_type_class #define elf_backend_relocate_section elf_x86_64_relocate_section #define elf_backend_size_dynamic_sections elf_x86_64_size_dynamic_sections |