Patch "tools/resolve_btfids: Fix build error with older host toolchains" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tools/resolve_btfids: Fix build error with older host toolchains

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-resolve_btfids-fix-build-error-with-older-host-toolchains.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 41462c6e730ca0e63f5fed5a517052385d980c54 Mon Sep 17 00:00:00 2001
From: Kun-Chuan Hsieh <jetswayss@xxxxxxxxx>
Date: Wed, 24 Feb 2021 05:27:52 +0000
Subject: tools/resolve_btfids: Fix build error with older host toolchains

From: Kun-Chuan Hsieh <jetswayss@xxxxxxxxx>

commit 41462c6e730ca0e63f5fed5a517052385d980c54 upstream.

Older libelf.h and glibc elf.h might not yet define the ELF compression
types.

Checking and defining SHF_COMPRESSED fix the build error when compiling
with older toolchains. Also, the tool resolve_btfids is compiled with host
toolchain. The host toolchain is more likely to be older than the cross
compile toolchain.

Fixes: 51f6463aacfb ("tools/resolve_btfids: Fix sections with wrong alignment")
Signed-off-by: Kun-Chuan Hsieh <jetswayss@xxxxxxxxx>
Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Link: https://lore.kernel.org/bpf/20210224052752.5284-1-jetswayss@xxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 tools/bpf/resolve_btfids/main.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/tools/bpf/resolve_btfids/main.c
+++ b/tools/bpf/resolve_btfids/main.c
@@ -258,6 +258,11 @@ static struct btf_id *add_symbol(struct
 	return btf_id__add(root, id, false);
 }
 
+/* Older libelf.h and glibc elf.h might not yet define the ELF compression types. */
+#ifndef SHF_COMPRESSED
+#define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */
+#endif
+
 /*
  * The data of compressed section should be aligned to 4
  * (for 32bit) or 8 (for 64 bit) bytes. The binutils ld


Patches currently in stable-queue which might be from jetswayss@xxxxxxxxx are

queue-5.10/tools-resolve_btfids-fix-build-error-with-older-host-toolchains.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux