Skip to content

Commit bce63b5

Browse files
authored
Merge pull request #813 from nathanchance/update-patches-feb-04-2025
Update patches (February 4, 2025)
2 parents f826871 + 9733bbd commit bce63b5

24 files changed

+486
-469
lines changed

patches/6.12/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
8b55f8818900c99dd4f55a59a103f5b29e41eb2c.patch
2-
20250124_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
2+
v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch

patches/6.12/20250124_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch renamed to patches/6.12/v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH] arm64: Handle .ARM.attributes section in linker scripts
2+
Subject: [PATCH v2] arm64: Handle .ARM.attributes section in linker scripts
33
From: Nathan Chancellor <[email protected]>
4-
Date: Fri, 24 Jan 2025 06:31:57 -0700
5-
Message-Id: <20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org>
4+
Date: Tue, 04 Feb 2025 10:48:55 -0700
5+
Message-Id: <20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org>
66
MIME-Version: 1.0
77
Content-Type: text/plain; charset="utf-8"
88
Content-Transfer-Encoding: 7bit
@@ -19,42 +19,49 @@ because it is not handled in the arm64 linker scripts.
1919
ld.lld: error: vmlinux.a(lib/win_minmax.o):(.ARM.attributes) is being placed in '.ARM.attributes'
2020
ld.lld: error: vmlinux.a(lib/xarray.o):(.ARM.attributes) is being placed in '.ARM.attributes'
2121

22-
Add this new section to the necessary linker scripts to resolve the warnings.
22+
Discard the new sections in the necessary linker scripts to resolve the
23+
warnings, as the kernel and vDSO do not need to retain it, similar to
24+
the .note.gnu.property section.
2325

2426
2527
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
2628
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
27-
Link: https://lore.kernel.org/r/20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org
29+
Link: https://lore.kernel.org/r/20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org
2830
Signed-off-by: Nathan Chancellor <[email protected]>
31+
---
32+
Changes in v2:
33+
- Discard the section instead of adding it to the final artifacts to
34+
mirror the .note.gnu.property section handling (Will).
35+
- Link to v1: https://lore.kernel.org/r/20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org
2936
---
3037
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
3138
arch/arm64/kernel/vmlinux.lds.S | 1 +
3239
2 files changed, 2 insertions(+)
3340

3441
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
35-
index 4ec32e86a8da..f8418a3a2758 100644
42+
index 4ec32e86a8da..8095fef66209 100644
3643
--- a/arch/arm64/kernel/vdso/vdso.lds.S
3744
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
38-
@@ -75,6 +75,7 @@ SECTIONS
39-
40-
DWARF_DEBUG
41-
ELF_DETAILS
42-
+ .ARM.attributes 0 : { *(.ARM.attributes) }
43-
44-
/DISCARD/ : {
45+
@@ -80,6 +80,7 @@ SECTIONS
4546
*(.data .data.* .gnu.linkonce.d.* .sdata*)
47+
*(.bss .sbss .dynbss .dynsbss)
48+
*(.eh_frame .eh_frame_hdr)
49+
+ *(.ARM.attributes)
50+
}
51+
}
52+
4653
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
47-
index f84c71f04d9e..c94942e9eb46 100644
54+
index f84c71f04d9e..e73326bd3ff7 100644
4855
--- a/arch/arm64/kernel/vmlinux.lds.S
4956
+++ b/arch/arm64/kernel/vmlinux.lds.S
50-
@@ -335,6 +335,7 @@ SECTIONS
51-
STABS_DEBUG
52-
DWARF_DEBUG
53-
ELF_DETAILS
54-
+ .ARM.attributes 0 : { *(.ARM.attributes) }
55-
56-
HEAD_SYMBOLS
57+
@@ -162,6 +162,7 @@ SECTIONS
58+
/DISCARD/ : {
59+
*(.interp .dynamic)
60+
*(.dynsym .dynstr .hash .gnu.hash)
61+
+ *(.ARM.attributes)
62+
}
5763

64+
. = KIMAGE_VADDR;
5865

5966
---
6067
base-commit: 1dd3393696efba1598aa7692939bba99d0cffae3

patches/6.6/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
8b55f8818900c99dd4f55a59a103f5b29e41eb2c.patch
2-
20250124_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
2+
v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch

patches/6.6/20250124_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch renamed to patches/6.6/v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH] arm64: Handle .ARM.attributes section in linker scripts
2+
Subject: [PATCH v2] arm64: Handle .ARM.attributes section in linker scripts
33
From: Nathan Chancellor <[email protected]>
4-
Date: Fri, 24 Jan 2025 06:31:57 -0700
5-
Message-Id: <20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org>
4+
Date: Tue, 04 Feb 2025 10:48:55 -0700
5+
Message-Id: <20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org>
66
MIME-Version: 1.0
77
Content-Type: text/plain; charset="utf-8"
88
Content-Transfer-Encoding: 7bit
@@ -19,42 +19,49 @@ because it is not handled in the arm64 linker scripts.
1919
ld.lld: error: vmlinux.a(lib/win_minmax.o):(.ARM.attributes) is being placed in '.ARM.attributes'
2020
ld.lld: error: vmlinux.a(lib/xarray.o):(.ARM.attributes) is being placed in '.ARM.attributes'
2121

22-
Add this new section to the necessary linker scripts to resolve the warnings.
22+
Discard the new sections in the necessary linker scripts to resolve the
23+
warnings, as the kernel and vDSO do not need to retain it, similar to
24+
the .note.gnu.property section.
2325

2426
2527
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
2628
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
27-
Link: https://lore.kernel.org/r/20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org
29+
Link: https://lore.kernel.org/r/20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org
2830
Signed-off-by: Nathan Chancellor <[email protected]>
31+
---
32+
Changes in v2:
33+
- Discard the section instead of adding it to the final artifacts to
34+
mirror the .note.gnu.property section handling (Will).
35+
- Link to v1: https://lore.kernel.org/r/20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org
2936
---
3037
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
3138
arch/arm64/kernel/vmlinux.lds.S | 1 +
3239
2 files changed, 2 insertions(+)
3340

3441
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
35-
index 4ec32e86a8da..f8418a3a2758 100644
42+
index 4ec32e86a8da..8095fef66209 100644
3643
--- a/arch/arm64/kernel/vdso/vdso.lds.S
3744
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
38-
@@ -75,6 +75,7 @@ SECTIONS
39-
40-
DWARF_DEBUG
41-
ELF_DETAILS
42-
+ .ARM.attributes 0 : { *(.ARM.attributes) }
43-
44-
/DISCARD/ : {
45+
@@ -80,6 +80,7 @@ SECTIONS
4546
*(.data .data.* .gnu.linkonce.d.* .sdata*)
47+
*(.bss .sbss .dynbss .dynsbss)
48+
*(.eh_frame .eh_frame_hdr)
49+
+ *(.ARM.attributes)
50+
}
51+
}
52+
4653
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
47-
index f84c71f04d9e..c94942e9eb46 100644
54+
index f84c71f04d9e..e73326bd3ff7 100644
4855
--- a/arch/arm64/kernel/vmlinux.lds.S
4956
+++ b/arch/arm64/kernel/vmlinux.lds.S
50-
@@ -335,6 +335,7 @@ SECTIONS
51-
STABS_DEBUG
52-
DWARF_DEBUG
53-
ELF_DETAILS
54-
+ .ARM.attributes 0 : { *(.ARM.attributes) }
55-
56-
HEAD_SYMBOLS
57+
@@ -162,6 +162,7 @@ SECTIONS
58+
/DISCARD/ : {
59+
*(.interp .dynamic)
60+
*(.dynsym .dynstr .hash .gnu.hash)
61+
+ *(.ARM.attributes)
62+
}
5763

64+
. = KIMAGE_VADDR;
5865

5966
---
6067
base-commit: 1dd3393696efba1598aa7692939bba99d0cffae3

patches/android-mainline/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20250124_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
1+
v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH] arm64: Handle .ARM.attributes section in linker scripts
2+
Subject: [PATCH v2] arm64: Handle .ARM.attributes section in linker scripts
33
From: Nathan Chancellor <[email protected]>
4-
Date: Fri, 24 Jan 2025 06:31:57 -0700
5-
Message-Id: <20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org>
4+
Date: Tue, 04 Feb 2025 10:48:55 -0700
5+
Message-Id: <20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org>
66
MIME-Version: 1.0
77
Content-Type: text/plain; charset="utf-8"
88
Content-Transfer-Encoding: 7bit
@@ -19,42 +19,49 @@ because it is not handled in the arm64 linker scripts.
1919
ld.lld: error: vmlinux.a(lib/win_minmax.o):(.ARM.attributes) is being placed in '.ARM.attributes'
2020
ld.lld: error: vmlinux.a(lib/xarray.o):(.ARM.attributes) is being placed in '.ARM.attributes'
2121

22-
Add this new section to the necessary linker scripts to resolve the warnings.
22+
Discard the new sections in the necessary linker scripts to resolve the
23+
warnings, as the kernel and vDSO do not need to retain it, similar to
24+
the .note.gnu.property section.
2325

2426
2527
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
2628
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
27-
Link: https://lore.kernel.org/r/20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org
29+
Link: https://lore.kernel.org/r/20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org
2830
Signed-off-by: Nathan Chancellor <[email protected]>
31+
---
32+
Changes in v2:
33+
- Discard the section instead of adding it to the final artifacts to
34+
mirror the .note.gnu.property section handling (Will).
35+
- Link to v1: https://lore.kernel.org/r/20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org
2936
---
3037
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
3138
arch/arm64/kernel/vmlinux.lds.S | 1 +
3239
2 files changed, 2 insertions(+)
3340

3441
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
35-
index 4ec32e86a8da..f8418a3a2758 100644
42+
index 4ec32e86a8da..8095fef66209 100644
3643
--- a/arch/arm64/kernel/vdso/vdso.lds.S
3744
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
38-
@@ -75,6 +75,7 @@ SECTIONS
39-
40-
DWARF_DEBUG
41-
ELF_DETAILS
42-
+ .ARM.attributes 0 : { *(.ARM.attributes) }
43-
44-
/DISCARD/ : {
45+
@@ -80,6 +80,7 @@ SECTIONS
4546
*(.data .data.* .gnu.linkonce.d.* .sdata*)
47+
*(.bss .sbss .dynbss .dynsbss)
48+
*(.eh_frame .eh_frame_hdr)
49+
+ *(.ARM.attributes)
50+
}
51+
}
52+
4653
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
47-
index f84c71f04d9e..c94942e9eb46 100644
54+
index f84c71f04d9e..e73326bd3ff7 100644
4855
--- a/arch/arm64/kernel/vmlinux.lds.S
4956
+++ b/arch/arm64/kernel/vmlinux.lds.S
50-
@@ -335,6 +335,7 @@ SECTIONS
51-
STABS_DEBUG
52-
DWARF_DEBUG
53-
ELF_DETAILS
54-
+ .ARM.attributes 0 : { *(.ARM.attributes) }
55-
56-
HEAD_SYMBOLS
57+
@@ -162,6 +162,7 @@ SECTIONS
58+
/DISCARD/ : {
59+
*(.interp .dynamic)
60+
*(.dynsym .dynstr .hash .gnu.hash)
61+
+ *(.ARM.attributes)
62+
}
5763

64+
. = KIMAGE_VADDR;
5865

5966
---
6067
base-commit: 1dd3393696efba1598aa7692939bba99d0cffae3

patches/android15-6.6/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20250124_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
1+
v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH] arm64: Handle .ARM.attributes section in linker scripts
2+
Subject: [PATCH v2] arm64: Handle .ARM.attributes section in linker scripts
33
From: Nathan Chancellor <[email protected]>
4-
Date: Fri, 24 Jan 2025 06:31:57 -0700
5-
Message-Id: <20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org>
4+
Date: Tue, 04 Feb 2025 10:48:55 -0700
5+
Message-Id: <20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org>
66
MIME-Version: 1.0
77
Content-Type: text/plain; charset="utf-8"
88
Content-Transfer-Encoding: 7bit
@@ -19,42 +19,49 @@ because it is not handled in the arm64 linker scripts.
1919
ld.lld: error: vmlinux.a(lib/win_minmax.o):(.ARM.attributes) is being placed in '.ARM.attributes'
2020
ld.lld: error: vmlinux.a(lib/xarray.o):(.ARM.attributes) is being placed in '.ARM.attributes'
2121

22-
Add this new section to the necessary linker scripts to resolve the warnings.
22+
Discard the new sections in the necessary linker scripts to resolve the
23+
warnings, as the kernel and vDSO do not need to retain it, similar to
24+
the .note.gnu.property section.
2325

2426
2527
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
2628
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
27-
Link: https://lore.kernel.org/r/20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org
29+
Link: https://lore.kernel.org/r/20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org
2830
Signed-off-by: Nathan Chancellor <[email protected]>
31+
---
32+
Changes in v2:
33+
- Discard the section instead of adding it to the final artifacts to
34+
mirror the .note.gnu.property section handling (Will).
35+
- Link to v1: https://lore.kernel.org/r/20250124-arm64-handle-arm-attributes-in-linker-script-v1-1-74135b6cf349@kernel.org
2936
---
3037
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
3138
arch/arm64/kernel/vmlinux.lds.S | 1 +
3239
2 files changed, 2 insertions(+)
3340

3441
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
35-
index 4ec32e86a8da..f8418a3a2758 100644
42+
index 4ec32e86a8da..8095fef66209 100644
3643
--- a/arch/arm64/kernel/vdso/vdso.lds.S
3744
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
38-
@@ -75,6 +75,7 @@ SECTIONS
39-
40-
DWARF_DEBUG
41-
ELF_DETAILS
42-
+ .ARM.attributes 0 : { *(.ARM.attributes) }
43-
44-
/DISCARD/ : {
45+
@@ -80,6 +80,7 @@ SECTIONS
4546
*(.data .data.* .gnu.linkonce.d.* .sdata*)
47+
*(.bss .sbss .dynbss .dynsbss)
48+
*(.eh_frame .eh_frame_hdr)
49+
+ *(.ARM.attributes)
50+
}
51+
}
52+
4653
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
47-
index f84c71f04d9e..c94942e9eb46 100644
54+
index f84c71f04d9e..e73326bd3ff7 100644
4855
--- a/arch/arm64/kernel/vmlinux.lds.S
4956
+++ b/arch/arm64/kernel/vmlinux.lds.S
50-
@@ -335,6 +335,7 @@ SECTIONS
51-
STABS_DEBUG
52-
DWARF_DEBUG
53-
ELF_DETAILS
54-
+ .ARM.attributes 0 : { *(.ARM.attributes) }
55-
56-
HEAD_SYMBOLS
57+
@@ -162,6 +162,7 @@ SECTIONS
58+
/DISCARD/ : {
59+
*(.interp .dynamic)
60+
*(.dynsym .dynstr .hash .gnu.hash)
61+
+ *(.ARM.attributes)
62+
}
5763

64+
. = KIMAGE_VADDR;
5865

5966
---
6067
base-commit: 1dd3393696efba1598aa7692939bba99d0cffae3

0 commit comments

Comments
 (0)