|
@@ -737,12 +737,15 @@ static int map_groups__split_kallsyms(struct map_groups *kmaps, struct dso *dso,
|
|
|
struct rb_root *root = &dso->symbols;
|
|
|
struct rb_node *next = rb_first(root);
|
|
|
int kernel_range = 0;
|
|
|
+ bool x86_64;
|
|
|
|
|
|
if (!kmaps)
|
|
|
return -1;
|
|
|
|
|
|
machine = kmaps->machine;
|
|
|
|
|
|
+ x86_64 = machine__is(machine, "x86_64");
|
|
|
+
|
|
|
while (next) {
|
|
|
char *module;
|
|
|
|
|
@@ -790,6 +793,16 @@ static int map_groups__split_kallsyms(struct map_groups *kmaps, struct dso *dso,
|
|
|
*/
|
|
|
pos->start = curr_map->map_ip(curr_map, pos->start);
|
|
|
pos->end = curr_map->map_ip(curr_map, pos->end);
|
|
|
+ } else if (x86_64 && is_entry_trampoline(pos->name)) {
|
|
|
+ /*
|
|
|
+ * These symbols are not needed anymore since the
|
|
|
+ * trampoline maps refer to the text section and it's
|
|
|
+ * symbols instead. Avoid having to deal with
|
|
|
+ * relocations, and the assumption that the first symbol
|
|
|
+ * is the start of kernel text, by simply removing the
|
|
|
+ * symbols at this point.
|
|
|
+ */
|
|
|
+ goto discard_symbol;
|
|
|
} else if (curr_map != initial_map) {
|
|
|
char dso_name[PATH_MAX];
|
|
|
struct dso *ndso;
|