Rebased from upstream / out of band repository.
[librecmc/librecmc.git] / package / libs / elfutils / patches / 101-no-fts.patch
1 --- a/libdwfl/argp-std.c
2 +++ b/libdwfl/argp-std.c
3 @@ -56,9 +56,6 @@ static const struct argp_option options[
4    { "linux-process-map", 'M', "FILE", 0,
5      N_("Find addresses in files mapped as read from FILE"
6         " in Linux /proc/PID/maps format"), 0 },
7 -  { "kernel", 'k', NULL, 0, N_("Find addresses in the running kernel"), 0 },
8 -  { "offline-kernel", 'K', "RELEASE", OPTION_ARG_OPTIONAL,
9 -    N_("Kernel with all modules"), 0 },
10    { "debuginfo-path", OPT_DEBUGINFO, "PATH", 0,
11      N_("Search path for separate debuginfo files"), 0 },
12    { NULL, 0, NULL, 0, NULL, 0 }
13 @@ -85,15 +82,6 @@ static const Dwfl_Callbacks proc_callbac
14      .find_elf = INTUSE(dwfl_linux_proc_find_elf),
15    };
16  
17 -static const Dwfl_Callbacks kernel_callbacks =
18 -  {
19 -    .find_debuginfo = INTUSE(dwfl_standard_find_debuginfo),
20 -    .debuginfo_path = &debuginfo_path,
21 -
22 -    .find_elf = INTUSE(dwfl_linux_kernel_find_elf),
23 -    .section_address = INTUSE(dwfl_linux_kernel_module_section_address),
24 -  };
25 -
26  /* Structure held at state->HOOK.  */
27  struct parse_opt
28  {
29 @@ -226,43 +214,6 @@ parse_opt (int key, char *arg, struct ar
30        }
31        break;
32  
33 -    case 'k':
34 -      {
35 -       struct parse_opt *opt = state->hook;
36 -       if (opt->dwfl == NULL)
37 -         {
38 -           Dwfl *dwfl = INTUSE(dwfl_begin) (&kernel_callbacks);
39 -           int result = INTUSE(dwfl_linux_kernel_report_kernel) (dwfl);
40 -           if (result != 0)
41 -             return fail (dwfl, result, _("cannot load kernel symbols"), state);
42 -           result = INTUSE(dwfl_linux_kernel_report_modules) (dwfl);
43 -           if (result != 0)
44 -             /* Non-fatal to have no modules since we do have the kernel.  */
45 -             argp_failure (state, 0, result, _("cannot find kernel modules"));
46 -           opt->dwfl = dwfl;
47 -         }
48 -       else
49 -         goto toomany;
50 -      }
51 -      break;
52 -
53 -    case 'K':
54 -      {
55 -       struct parse_opt *opt = state->hook;
56 -       if (opt->dwfl == NULL)
57 -         {
58 -           Dwfl *dwfl = INTUSE(dwfl_begin) (&offline_callbacks);
59 -           int result = INTUSE(dwfl_linux_kernel_report_offline) (dwfl, arg,
60 -                                                                  NULL);
61 -           if (result != 0)
62 -             return fail (dwfl, result, _("cannot find kernel or modules"), state);
63 -           opt->dwfl = dwfl;
64 -         }
65 -       else
66 -         goto toomany;
67 -      }
68 -      break;
69 -
70      case ARGP_KEY_SUCCESS:
71        {
72         struct parse_opt *opt = state->hook;
73 --- a/libdwfl/Makefile.am
74 +++ b/libdwfl/Makefile.am
75 @@ -49,7 +49,7 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
76                     argp-std.c find-debuginfo.c \
77                     dwfl_build_id_find_elf.c \
78                     dwfl_build_id_find_debuginfo.c \
79 -                   linux-kernel-modules.c linux-proc-maps.c \
80 +                   linux-proc-maps.c \
81                     dwfl_addrmodule.c dwfl_addrdwarf.c \
82                     cu.c dwfl_module_nextcu.c dwfl_nextcu.c dwfl_cumodule.c \
83                     dwfl_module_addrdie.c dwfl_addrdie.c \