• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂3a36c1c7b4395f9489a3d6ad27ab5ac873d1e62c (tree)
時間2016-01-22 09:36:13
作者Alan Modra <amodra@gmai...>
CommiterAlan Modra

Log Message

Remove elf_backend_write_core_note

This function was added in 2007 to support powerpc gdb "gcore" writing
32-bit powerpc linux core files on a 64-bit powerpc host, when
PowerPC64 glibc lacked (and still lacks) 32-bit versions of prstatus_t
and prpsinfo_t. Now that gdb has elfcore_write_linux_prstatus32/64
and elfcore_write_linux_prpsinfo32/64, this linux specific backend
function should disappear.

* elf-bfd.h (struct elf_backend_data): Remove
elf_backend_write_core_note.
* elf.c (elfcore_write_prpsinfo, elfcore_write_prstatus): Don't call
elf_backend_write_core_note.
* elf32-arm.c (elf32_arm_nabi_write_core_note): Delete function.
(elf_backend_write_core_note): Don't define.
* elf32-ppc.c (ppc_elf_write_core_note): Delete function.
(elf_backend_write_core_note): Don't define.
* elf64-ppc.c (ppc64_elf_write_core_note): Delete function.
(elf_backend_write_core_note): Don't define.
* elf64-x86-64.c (elf_x86_64_write_core_note): Delete function.
(elf_backend_write_core_note): Don't define.
(CORE_HEADER): Don't include.
* elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Delete function.
* elfxx-aarch64.h (_bfd_aarch64_elf_write_core_note): Delete prototype.
(elf_backend_write_core_note): Don't define.
* elfxx-target.h (elf_backend_write_core_note): Don't define.
(elfNN_bed): Adjust.
* hosts/x86-64linux.h: Delete file.
* configure.ac (CORE_HEADER): Delete.
* configure: Regenerate.
* config.in: Regenerate.

Change Summary

差異

--- a/bfd/config.in
+++ b/bfd/config.in
@@ -7,9 +7,6 @@
77 #endif
88 #define __CONFIG_H__ 1
99
10-/* Name of host specific core header file to include in elf.c. */
11-#undef CORE_HEADER
12-
1310 /* Define to 1 if translation of program messages to the user's native
1411 language is requested. */
1512 #undef ENABLE_NLS
--- a/bfd/configure
+++ b/bfd/configure
@@ -14644,7 +14644,6 @@ test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selar
1464414644 # If we are configured native, pick a core file support file.
1464514645 COREFILE=
1464614646 COREFLAG=
14647-CORE_HEADER=
1464814647 TRAD_HEADER=
1464914648 if test "${target}" = "${host}"; then
1465014649 case "${host}" in
@@ -14722,10 +14721,6 @@ if test "${target}" = "${host}"; then
1472214721 i[3-7]86-*-linux-*)
1472314722 COREFILE=trad-core.lo
1472414723 TRAD_HEADER='"hosts/i386linux.h"'
14725- case "$enable_targets"-"$want64" in
14726- *x86_64-*linux*|*-true)
14727- CORE_HEADER='"hosts/x86-64linux.h"'
14728- esac
1472914724 ;;
1473014725 i[3-7]86-*-isc*) COREFILE=trad-core.lo ;;
1473114726 i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;;
@@ -14876,9 +14871,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1487614871 COREFILE=trad-core.lo
1487714872 TRAD_HEADER='"hosts/vaxbsd.h"'
1487814873 ;;
14879- x86_64-*-linux*)
14880- CORE_HEADER='"hosts/x86-64linux.h"'
14881- ;;
1488214874 x86_64-*-netbsd* | x86_64-*-openbsd*)
1488314875 COREFILE=netbsd-core.lo
1488414876 ;;
@@ -15694,13 +15686,6 @@ $as_echo "$bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&6; }
1569415686 fi
1569515687
1569615688
15697-if test -n "$CORE_HEADER"; then
15698-
15699-cat >>confdefs.h <<_ACEOF
15700-#define CORE_HEADER $CORE_HEADER
15701-_ACEOF
15702-
15703-fi
1570415689 if test -n "$TRAD_HEADER"; then
1570515690
1570615691 cat >>confdefs.h <<_ACEOF
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -841,7 +841,6 @@ AC_SUBST(havevecs)
841841 # If we are configured native, pick a core file support file.
842842 COREFILE=
843843 COREFLAG=
844-CORE_HEADER=
845844 TRAD_HEADER=
846845 if test "${target}" = "${host}"; then
847846 case "${host}" in
@@ -941,10 +940,6 @@ changequote(,)dnl
941940 changequote([,])dnl
942941 COREFILE=trad-core.lo
943942 TRAD_HEADER='"hosts/i386linux.h"'
944- case "$enable_targets"-"$want64" in
945- *x86_64-*linux*|*-true)
946- CORE_HEADER='"hosts/x86-64linux.h"'
947- esac
948943 ;;
949944 changequote(,)dnl
950945 i[3-7]86-*-isc*) COREFILE=trad-core.lo ;;
@@ -1081,9 +1076,6 @@ changequote([,])dnl
10811076 COREFILE=trad-core.lo
10821077 TRAD_HEADER='"hosts/vaxbsd.h"'
10831078 ;;
1084- x86_64-*-linux*)
1085- CORE_HEADER='"hosts/x86-64linux.h"'
1086- ;;
10871079 x86_64-*-netbsd* | x86_64-*-openbsd*)
10881080 COREFILE=netbsd-core.lo
10891081 ;;
@@ -1132,10 +1124,6 @@ changequote([,])dnl
11321124 fi
11331125 AC_SUBST(COREFILE)
11341126 AC_SUBST(COREFLAG)
1135-if test -n "$CORE_HEADER"; then
1136- AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER,
1137- [Name of host specific core header file to include in elf.c.])
1138-fi
11391127 if test -n "$TRAD_HEADER"; then
11401128 AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
11411129 [Name of host specific header file to include in trad-core.c.])
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1190,10 +1190,6 @@ struct elf_backend_data
11901190 bfd_boolean (*elf_backend_grok_psinfo)
11911191 (bfd *, Elf_Internal_Note *);
11921192
1193- /* This function, if defined, is called to write a note to a corefile. */
1194- char *(*elf_backend_write_core_note)
1195- (bfd *abfd, char *buf, int *bufsiz, int note_type, ...);
1196-
11971193 /* This function, if defined, is called to convert target-specific
11981194 section flag names into hex values. */
11991195 flagword (*elf_backend_lookup_section_flags_hook)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9726,25 +9726,16 @@ elfcore_write_note (bfd *abfd,
97269726 }
97279727
97289728 char *
9729-elfcore_write_prpsinfo (bfd *abfd,
9729+elfcore_write_prpsinfo (bfd *abfd ATTRIBUTE_UNUSED,
97309730 char *buf,
9731- int *bufsiz,
9732- const char *fname,
9733- const char *psargs)
9731+ int *bufsiz ATTRIBUTE_UNUSED,
9732+ const char *fname ATTRIBUTE_UNUSED,
9733+ const char *psargs ATTRIBUTE_UNUSED)
97349734 {
9735- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
9736-
9737- if (bed->elf_backend_write_core_note != NULL)
9738- {
9739- char *ret;
9740- ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz,
9741- NT_PRPSINFO, fname, psargs);
9742- if (ret != NULL)
9743- return ret;
9744- }
9745-
97469735 #if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
97479736 #if defined (HAVE_PRPSINFO32_T) || defined (HAVE_PSINFO32_T)
9737+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
9738+
97489739 if (bed->s->elfclass == ELFCLASS32)
97499740 {
97509741 #if defined (HAVE_PSINFO32_T)
@@ -9843,27 +9834,17 @@ elfcore_write_linux_prstatus64
98439834 }
98449835
98459836 char *
9846-elfcore_write_prstatus (bfd *abfd,
9837+elfcore_write_prstatus (bfd *abfd ATTRIBUTE_UNUSED,
98479838 char *buf,
9848- int *bufsiz,
9849- long pid,
9850- int cursig,
9851- const void *gregs)
9839+ int *bufsiz ATTRIBUTE_UNUSED,
9840+ long pid ATTRIBUTE_UNUSED,
9841+ int cursig ATTRIBUTE_UNUSED,
9842+ const void *gregs ATTRIBUTE_UNUSED)
98529843 {
9853- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
9854-
9855- if (bed->elf_backend_write_core_note != NULL)
9856- {
9857- char *ret;
9858- ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz,
9859- NT_PRSTATUS,
9860- pid, cursig, gregs);
9861- if (ret != NULL)
9862- return ret;
9863- }
9864-
98659844 #if defined (HAVE_PRSTATUS_T)
98669845 #if defined (HAVE_PRSTATUS32_T)
9846+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
9847+
98679848 if (bed->s->elfclass == ELFCLASS32)
98689849 {
98699850 prstatus32_t prstat;
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2050,54 +2050,6 @@ elf32_arm_nabi_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
20502050 return TRUE;
20512051 }
20522052
2053-static char *
2054-elf32_arm_nabi_write_core_note (bfd *abfd, char *buf, int *bufsiz,
2055- int note_type, ...)
2056-{
2057- switch (note_type)
2058- {
2059- default:
2060- return NULL;
2061-
2062- case NT_PRPSINFO:
2063- {
2064- char data[124];
2065- va_list ap;
2066-
2067- va_start (ap, note_type);
2068- memset (data, 0, sizeof (data));
2069- strncpy (data + 28, va_arg (ap, const char *), 16);
2070- strncpy (data + 44, va_arg (ap, const char *), 80);
2071- va_end (ap);
2072-
2073- return elfcore_write_note (abfd, buf, bufsiz,
2074- "CORE", note_type, data, sizeof (data));
2075- }
2076-
2077- case NT_PRSTATUS:
2078- {
2079- char data[148];
2080- va_list ap;
2081- long pid;
2082- int cursig;
2083- const void *greg;
2084-
2085- va_start (ap, note_type);
2086- memset (data, 0, sizeof (data));
2087- pid = va_arg (ap, long);
2088- bfd_put_32 (abfd, pid, data + 24);
2089- cursig = va_arg (ap, int);
2090- bfd_put_16 (abfd, cursig, data + 12);
2091- greg = va_arg (ap, const void *);
2092- memcpy (data + 72, greg, 72);
2093- va_end (ap);
2094-
2095- return elfcore_write_note (abfd, buf, bufsiz,
2096- "CORE", note_type, data, sizeof (data));
2097- }
2098- }
2099-}
2100-
21012053 #define TARGET_LITTLE_SYM arm_elf32_le_vec
21022054 #define TARGET_LITTLE_NAME "elf32-littlearm"
21032055 #define TARGET_BIG_SYM arm_elf32_be_vec
@@ -2105,7 +2057,6 @@ elf32_arm_nabi_write_core_note (bfd *abfd, char *buf, int *bufsiz,
21052057
21062058 #define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
21072059 #define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
2108-#define elf_backend_write_core_note elf32_arm_nabi_write_core_note
21092060
21102061 typedef unsigned long int insn32;
21112062 typedef unsigned short int insn16;
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2307,52 +2307,6 @@ elfcore_write_ppc_linux_prpsinfo32
23072307 "CORE", NT_PRPSINFO, &data, sizeof (data));
23082308 }
23092309
2310-static char *
2311-ppc_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type, ...)
2312-{
2313- switch (note_type)
2314- {
2315- default:
2316- return NULL;
2317-
2318- case NT_PRPSINFO:
2319- {
2320- char data[128];
2321- va_list ap;
2322-
2323- va_start (ap, note_type);
2324- memset (data, 0, sizeof (data));
2325- strncpy (data + 32, va_arg (ap, const char *), 16);
2326- strncpy (data + 48, va_arg (ap, const char *), 80);
2327- va_end (ap);
2328- return elfcore_write_note (abfd, buf, bufsiz,
2329- "CORE", note_type, data, sizeof (data));
2330- }
2331-
2332- case NT_PRSTATUS:
2333- {
2334- char data[268];
2335- va_list ap;
2336- long pid;
2337- int cursig;
2338- const void *greg;
2339-
2340- va_start (ap, note_type);
2341- memset (data, 0, 72);
2342- pid = va_arg (ap, long);
2343- bfd_put_32 (abfd, pid, data + 24);
2344- cursig = va_arg (ap, int);
2345- bfd_put_16 (abfd, cursig, data + 12);
2346- greg = va_arg (ap, const void *);
2347- memcpy (data + 72, greg, 192);
2348- memset (data + 264, 0, 4);
2349- va_end (ap);
2350- return elfcore_write_note (abfd, buf, bufsiz,
2351- "CORE", note_type, data, sizeof (data));
2352- }
2353- }
2354-}
2355-
23562310 static flagword
23572311 ppc_elf_lookup_section_flags (char *flag_name)
23582312 {
@@ -10746,7 +10700,6 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
1074610700 #define elf_backend_modify_segment_map ppc_elf_modify_segment_map
1074710701 #define elf_backend_grok_prstatus ppc_elf_grok_prstatus
1074810702 #define elf_backend_grok_psinfo ppc_elf_grok_psinfo
10749-#define elf_backend_write_core_note ppc_elf_write_core_note
1075010703 #define elf_backend_reloc_type_class ppc_elf_reloc_type_class
1075110704 #define elf_backend_begin_write_processing ppc_elf_begin_write_processing
1075210705 #define elf_backend_final_write_processing ppc_elf_final_write_processing
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -90,7 +90,6 @@ static bfd_vma opd_entry_value
9090 #define elf_backend_object_p ppc64_elf_object_p
9191 #define elf_backend_grok_prstatus ppc64_elf_grok_prstatus
9292 #define elf_backend_grok_psinfo ppc64_elf_grok_psinfo
93-#define elf_backend_write_core_note ppc64_elf_write_core_note
9493 #define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections
9594 #define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol
9695 #define elf_backend_add_symbol_hook ppc64_elf_add_symbol_hook
@@ -2947,53 +2946,6 @@ ppc64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
29472946 return TRUE;
29482947 }
29492948
2950-static char *
2951-ppc64_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
2952- ...)
2953-{
2954- switch (note_type)
2955- {
2956- default:
2957- return NULL;
2958-
2959- case NT_PRPSINFO:
2960- {
2961- char data[136];
2962- va_list ap;
2963-
2964- va_start (ap, note_type);
2965- memset (data, 0, sizeof (data));
2966- strncpy (data + 40, va_arg (ap, const char *), 16);
2967- strncpy (data + 56, va_arg (ap, const char *), 80);
2968- va_end (ap);
2969- return elfcore_write_note (abfd, buf, bufsiz,
2970- "CORE", note_type, data, sizeof (data));
2971- }
2972-
2973- case NT_PRSTATUS:
2974- {
2975- char data[504];
2976- va_list ap;
2977- long pid;
2978- int cursig;
2979- const void *greg;
2980-
2981- va_start (ap, note_type);
2982- memset (data, 0, 112);
2983- pid = va_arg (ap, long);
2984- bfd_put_32 (abfd, pid, data + 32);
2985- cursig = va_arg (ap, int);
2986- bfd_put_16 (abfd, cursig, data + 12);
2987- greg = va_arg (ap, const void *);
2988- memcpy (data + 112, greg, 384);
2989- memset (data + 496, 0, 8);
2990- va_end (ap);
2991- return elfcore_write_note (abfd, buf, bufsiz,
2992- "CORE", note_type, data, sizeof (data));
2993- }
2994- }
2995-}
2996-
29972949 /* Add extra PPC sections. */
29982950
29992951 static const struct bfd_elf_special_section ppc64_elf_special_sections[]=
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -34,11 +34,6 @@
3434 #include "opcode/i386.h"
3535 #include "elf/x86-64.h"
3636
37-#ifdef CORE_HEADER
38-#include <stdarg.h>
39-#include CORE_HEADER
40-#endif
41-
4237 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */
4338 #define MINUS_ONE (~ (bfd_vma) 0)
4439
@@ -436,94 +431,6 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
436431
437432 return TRUE;
438433 }
439-
440-#ifdef CORE_HEADER
441-static char *
442-elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
443- int note_type, ...)
444-{
445- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
446- va_list ap;
447- const char *fname, *psargs;
448- long pid;
449- int cursig;
450- const void *gregs;
451-
452- switch (note_type)
453- {
454- default:
455- return NULL;
456-
457- case NT_PRPSINFO:
458- va_start (ap, note_type);
459- fname = va_arg (ap, const char *);
460- psargs = va_arg (ap, const char *);
461- va_end (ap);
462-
463- if (bed->s->elfclass == ELFCLASS32)
464- {
465- prpsinfo32_t data;
466- memset (&data, 0, sizeof (data));
467- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
468- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
469- return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
470- &data, sizeof (data));
471- }
472- else
473- {
474- prpsinfo64_t data;
475- memset (&data, 0, sizeof (data));
476- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
477- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
478- return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
479- &data, sizeof (data));
480- }
481- /* NOTREACHED */
482-
483- case NT_PRSTATUS:
484- va_start (ap, note_type);
485- pid = va_arg (ap, long);
486- cursig = va_arg (ap, int);
487- gregs = va_arg (ap, const void *);
488- va_end (ap);
489-
490- if (bed->s->elfclass == ELFCLASS32)
491- {
492- if (bed->elf_machine_code == EM_X86_64)
493- {
494- prstatusx32_t prstat;
495- memset (&prstat, 0, sizeof (prstat));
496- prstat.pr_pid = pid;
497- prstat.pr_cursig = cursig;
498- memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
499- return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
500- &prstat, sizeof (prstat));
501- }
502- else
503- {
504- prstatus32_t prstat;
505- memset (&prstat, 0, sizeof (prstat));
506- prstat.pr_pid = pid;
507- prstat.pr_cursig = cursig;
508- memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
509- return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
510- &prstat, sizeof (prstat));
511- }
512- }
513- else
514- {
515- prstatus64_t prstat;
516- memset (&prstat, 0, sizeof (prstat));
517- prstat.pr_pid = pid;
518- prstat.pr_cursig = cursig;
519- memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
520- return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
521- &prstat, sizeof (prstat));
522- }
523- }
524- /* NOTREACHED */
525-}
526-#endif
527434
528435 /* Functions for the x86-64 ELF linker. */
529436
@@ -6359,9 +6266,6 @@ static const struct bfd_elf_special_section
63596266 #define elf_backend_gc_sweep_hook elf_x86_64_gc_sweep_hook
63606267 #define elf_backend_grok_prstatus elf_x86_64_grok_prstatus
63616268 #define elf_backend_grok_psinfo elf_x86_64_grok_psinfo
6362-#ifdef CORE_HEADER
6363-#define elf_backend_write_core_note elf_x86_64_write_core_note
6364-#endif
63656269 #define elf_backend_reloc_type_class elf_x86_64_reloc_type_class
63666270 #define elf_backend_relocate_section elf_x86_64_relocate_section
63676271 #define elf_backend_size_dynamic_sections elf_x86_64_size_dynamic_sections
--- a/bfd/elfxx-aarch64.c
+++ b/bfd/elfxx-aarch64.c
@@ -611,51 +611,3 @@ _bfd_aarch64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
611611
612612 return TRUE;
613613 }
614-
615-char *
616-_bfd_aarch64_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
617- ...)
618-{
619- switch (note_type)
620- {
621- default:
622- return NULL;
623-
624- case NT_PRPSINFO:
625- {
626- char data[136];
627- va_list ap;
628-
629- va_start (ap, note_type);
630- memset (data, 0, sizeof (data));
631- strncpy (data + 40, va_arg (ap, const char *), 16);
632- strncpy (data + 56, va_arg (ap, const char *), 80);
633- va_end (ap);
634-
635- return elfcore_write_note (abfd, buf, bufsiz, "CORE",
636- note_type, data, sizeof (data));
637- }
638-
639- case NT_PRSTATUS:
640- {
641- char data[392];
642- va_list ap;
643- long pid;
644- int cursig;
645- const void *greg;
646-
647- va_start (ap, note_type);
648- memset (data, 0, sizeof (data));
649- pid = va_arg (ap, long);
650- bfd_put_32 (abfd, pid, data + 32);
651- cursig = va_arg (ap, int);
652- bfd_put_16 (abfd, cursig, data + 12);
653- greg = va_arg (ap, const void *);
654- memcpy (data + 112, greg, 272);
655- va_end (ap);
656-
657- return elfcore_write_note (abfd, buf, bufsiz, "CORE",
658- note_type, data, sizeof (data));
659- }
660- }
661-}
--- a/bfd/elfxx-aarch64.h
+++ b/bfd/elfxx-aarch64.h
@@ -58,10 +58,6 @@ _bfd_aarch64_elf_grok_prstatus (bfd *, Elf_Internal_Note *);
5858 extern bfd_boolean
5959 _bfd_aarch64_elf_grok_psinfo (bfd *, Elf_Internal_Note *);
6060
61-extern char *
62-_bfd_aarch64_elf_write_core_note (bfd *, char *, int *, int, ...);
63-
6461 #define elf_backend_add_symbol_hook _bfd_aarch64_elf_add_symbol_hook
6562 #define elf_backend_grok_prstatus _bfd_aarch64_elf_grok_prstatus
6663 #define elf_backend_grok_psinfo _bfd_aarch64_elf_grok_psinfo
67-#define elf_backend_write_core_note _bfd_aarch64_elf_write_core_note
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -550,9 +550,6 @@
550550 #ifndef elf_backend_grok_psinfo
551551 #define elf_backend_grok_psinfo NULL
552552 #endif
553-#ifndef elf_backend_write_core_note
554-#define elf_backend_write_core_note NULL
555-#endif
556553 #ifndef elf_backend_lookup_section_flags_hook
557554 #define elf_backend_lookup_section_flags_hook NULL
558555 #endif
@@ -762,7 +759,6 @@ static struct elf_backend_data elfNN_bed =
762759 elf_backend_sort_relocs_p,
763760 elf_backend_grok_prstatus,
764761 elf_backend_grok_psinfo,
765- elf_backend_write_core_note,
766762 elf_backend_lookup_section_flags_hook,
767763 elf_backend_reloc_type_class,
768764 elf_backend_discard_info,
--- a/bfd/hosts/x86-64linux.h
+++ /dev/null
@@ -1,232 +0,0 @@
1-/* Copyright (C) 2006-2016 Free Software Foundation, Inc.
2- This file is part of the GNU C Library.
3-
4- The GNU C Library is free software; you can redistribute it and/or
5- modify it under the terms of the GNU Lesser General Public
6- License as published by the Free Software Foundation; either
7- version 2.1 of the License, or (at your option) any later version.
8-
9- The GNU C Library is distributed in the hope that it will be useful,
10- but WITHOUT ANY WARRANTY; without even the implied warranty of
11- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12- Lesser General Public License for more details.
13-
14- You should have received a copy of the GNU Lesser General Public
15- License along with the GNU C Library; if not, write to the Free
16- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17- 02111-1307 USA. */
18-
19-/* This is somewhat modelled after the file of the same name on SVR4
20- systems. It provides a definition of the core file format for ELF
21- used on Linux. It doesn't have anything to do with the /proc file
22- system, even though Linux has one.
23-
24- Anyway, the whole purpose of this file is for GDB and GDB only.
25- Don't read too much into it. Don't use it for anything other than
26- GDB unless you know what you are doing. */
27-
28-#include <features.h>
29-#include <sys/time.h>
30-#include <sys/types.h>
31-
32-/* We define here only the symbols differing from their 64-bit variant. */
33-#include <sys/procfs.h>
34-
35-#ifdef HAVE_STDINT_H
36-#include <stdint.h>
37-#else
38-typedef unsigned int uint32_t;
39-typedef unsigned long long int uint64_t;
40-#endif
41-
42-/* Unsigned 64-bit integer aligned to 8 bytes. */
43-typedef uint64_t __attribute__ ((__aligned__ (8))) a8_uint64_t;
44-
45-#undef HAVE_PRPSINFO32_T
46-#define HAVE_PRPSINFO32_T
47-#undef HAVE_PRPSINFO32_T_PR_PID
48-#define HAVE_PRPSINFO32_T_PR_PID
49-
50-#undef HAVE_PRSTATUS32_T
51-#define HAVE_PRSTATUS32_T
52-
53-/* These are the 32-bit x86 structures. */
54-
55-struct user_regs32_struct
56-{
57- int32_t ebx;
58- int32_t ecx;
59- int32_t edx;
60- int32_t esi;
61- int32_t edi;
62- int32_t ebp;
63- int32_t eax;
64- int32_t xds;
65- int32_t xes;
66- int32_t xfs;
67- int32_t xgs;
68- int32_t orig_eax;
69- int32_t eip;
70- int32_t xcs;
71- int32_t eflags;
72- int32_t esp;
73- int32_t xss;
74-};
75-
76-struct user_regs64_struct
77-{
78- a8_uint64_t r15;
79- a8_uint64_t r14;
80- a8_uint64_t r13;
81- a8_uint64_t r12;
82- a8_uint64_t rbp;
83- a8_uint64_t rbx;
84- a8_uint64_t r11;
85- a8_uint64_t r10;
86- a8_uint64_t r9;
87- a8_uint64_t r8;
88- a8_uint64_t rax;
89- a8_uint64_t rcx;
90- a8_uint64_t rdx;
91- a8_uint64_t rsi;
92- a8_uint64_t rdi;
93- a8_uint64_t orig_rax;
94- a8_uint64_t rip;
95- a8_uint64_t cs;
96- a8_uint64_t eflags;
97- a8_uint64_t rsp;
98- a8_uint64_t ss;
99- a8_uint64_t fs_base;
100- a8_uint64_t gs_base;
101- a8_uint64_t ds;
102- a8_uint64_t es;
103- a8_uint64_t fs;
104- a8_uint64_t gs;
105-};
106-
107-/* Type for a general-purpose register. */
108-typedef uint32_t elf_greg32_t;
109-typedef a8_uint64_t elf_greg64_t;
110-
111-/* And the whole bunch of them. We could have used `struct
112- user_regs_struct' directly in the typedef, but tradition says that
113- the register set is an array, which does have some peculiar
114- semantics, so leave it that way. */
115-#define ELF_NGREG32 (sizeof (struct user_regs32_struct) / sizeof(elf_greg32_t))
116-typedef elf_greg32_t elf_gregset32_t[ELF_NGREG32];
117-#define ELF_NGREG64 (sizeof (struct user_regs64_struct) / sizeof(elf_greg64_t))
118-typedef elf_greg64_t elf_gregset64_t[ELF_NGREG64];
119-
120-/* Definitions to generate Intel SVR4-like core files. These mostly
121- have the same names as the SVR4 types with "elf_" tacked on the
122- front to prevent clashes with Linux definitions, and the typedef
123- forms have been avoided. This is mostly like the SVR4 structure,
124- but more Linuxy, with things that Linux does not support and which
125- GDB doesn't really use excluded. */
126-
127-struct prstatus32_timeval
128- {
129- int tv_sec;
130- int tv_usec;
131- };
132-
133-struct prstatus64_timeval
134- {
135- a8_uint64_t tv_sec;
136- a8_uint64_t tv_usec;
137- };
138-
139-struct elf_prstatus32
140- {
141- struct elf_siginfo pr_info; /* Info associated with signal. */
142- short int pr_cursig; /* Current signal. */
143- unsigned int pr_sigpend; /* Set of pending signals. */
144- unsigned int pr_sighold; /* Set of held signals. */
145- pid_t pr_pid;
146- pid_t pr_ppid;
147- pid_t pr_pgrp;
148- pid_t pr_sid;
149- struct prstatus32_timeval pr_utime; /* User time. */
150- struct prstatus32_timeval pr_stime; /* System time. */
151- struct prstatus32_timeval pr_cutime; /* Cumulative user time. */
152- struct prstatus32_timeval pr_cstime; /* Cumulative system time. */
153- elf_gregset32_t pr_reg; /* GP registers. */
154- int pr_fpvalid; /* True if math copro being used. */
155- };
156-
157-struct elf_prstatusx32
158- {
159- struct elf_siginfo pr_info; /* Info associated with signal. */
160- short int pr_cursig; /* Current signal. */
161- unsigned int pr_sigpend; /* Set of pending signals. */
162- unsigned int pr_sighold; /* Set of held signals. */
163- pid_t pr_pid;
164- pid_t pr_ppid;
165- pid_t pr_pgrp;
166- pid_t pr_sid;
167- struct prstatus32_timeval pr_utime; /* User time. */
168- struct prstatus32_timeval pr_stime; /* System time. */
169- struct prstatus32_timeval pr_cutime; /* Cumulative user time. */
170- struct prstatus32_timeval pr_cstime; /* Cumulative system time. */
171- elf_gregset64_t pr_reg; /* GP registers. */
172- int pr_fpvalid; /* True if math copro being used. */
173- };
174-
175-struct elf_prstatus64
176- {
177- struct elf_siginfo pr_info; /* Info associated with signal. */
178- short int pr_cursig; /* Current signal. */
179- a8_uint64_t pr_sigpend; /* Set of pending signals. */
180- a8_uint64_t pr_sighold; /* Set of held signals. */
181- pid_t pr_pid;
182- pid_t pr_ppid;
183- pid_t pr_pgrp;
184- pid_t pr_sid;
185- struct prstatus64_timeval pr_utime; /* User time. */
186- struct prstatus64_timeval pr_stime; /* System time. */
187- struct prstatus64_timeval pr_cutime; /* Cumulative user time. */
188- struct prstatus64_timeval pr_cstime; /* Cumulative system time. */
189- elf_gregset64_t pr_reg; /* GP registers. */
190- int pr_fpvalid; /* True if math copro being used. */
191- };
192-
193-struct elf_prpsinfo32
194- {
195- char pr_state; /* Numeric process state. */
196- char pr_sname; /* Char for pr_state. */
197- char pr_zomb; /* Zombie. */
198- char pr_nice; /* Nice val. */
199- unsigned int pr_flag; /* Flags. */
200- unsigned short int pr_uid;
201- unsigned short int pr_gid;
202- int pr_pid, pr_ppid, pr_pgrp, pr_sid;
203- /* Lots missing */
204- char pr_fname[16]; /* Filename of executable. */
205- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
206- };
207-
208-struct elf_prpsinfo64
209- {
210- char pr_state; /* Numeric process state. */
211- char pr_sname; /* Char for pr_state. */
212- char pr_zomb; /* Zombie. */
213- char pr_nice; /* Nice val. */
214- a8_uint64_t pr_flag; /* Flags. */
215- unsigned int pr_uid;
216- unsigned int pr_gid;
217- int pr_pid, pr_ppid, pr_pgrp, pr_sid;
218- /* Lots missing */
219- char pr_fname[16]; /* Filename of executable. */
220- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
221- };
222-
223-/* The rest of this file provides the types for emulation of the
224- Solaris <proc_service.h> interfaces that should be implemented by
225- users of libthread_db. */
226-
227-/* Process status and info. In the end we do provide typedefs for them. */
228-typedef struct elf_prstatus32 prstatus32_t;
229-typedef struct elf_prstatusx32 prstatusx32_t;
230-typedef struct elf_prstatus64 prstatus64_t;
231-typedef struct elf_prpsinfo32 prpsinfo32_t;
232-typedef struct elf_prpsinfo64 prpsinfo64_t;