hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/tools/perf/util/genelf_debug.c
....@@ -1,11 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * genelf_debug.c
34 * Copyright (C) 2015, Google, Inc
45 *
56 * Contributed by:
67 * Stephane Eranian <eranian@google.com>
7
- *
8
- * Released under the GPL v2.
98 *
109 * based on GPLv2 source code from Oprofile
1110 * @remark Copyright 2007 OProfile authors
....@@ -25,7 +24,6 @@
2524 #include <err.h>
2625 #include <dwarf.h>
2726
28
-#include "perf.h"
2927 #include "genelf.h"
3028 #include "../util/jitdump.h"
3129
....@@ -344,7 +342,7 @@
344342 */
345343
346344 /* start state of the state machine we take care of */
347
- unsigned long last_vma = code_addr;
345
+ unsigned long last_vma = 0;
348346 char const *cur_filename = NULL;
349347 unsigned long cur_file_idx = 0;
350348 int last_line = 1;
....@@ -475,7 +473,7 @@
475473 ent = debug_entry_next(ent);
476474 }
477475 add_compilation_unit(di, buffer_ext_size(dl));
478
- add_debug_line(dl, debug, nr_debug_entries, 0);
476
+ add_debug_line(dl, debug, nr_debug_entries, GEN_ELF_TEXT_OFFSET);
479477 add_debug_abbrev(da);
480478 if (0) buffer_ext_dump(da, "abbrev");
481479