Skip to content

Commit 446722e

Browse files
committed
patches: Update .ARM.attributes patch for accepted version
Now that this patch should have a stable SHA since it is in the arm64 fixes tree and the version we are applying is slightly outdated (v2 vs. v3), update the patch with the accepted version to help with tracking. Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 7fbcfe9 commit 446722e

20 files changed

+308
-404
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH v2] arm64: Handle .ARM.attributes section in linker scripts
1+
From ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b Mon Sep 17 00:00:00 2001
32
From: Nathan Chancellor <[email protected]>
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>
6-
MIME-Version: 1.0
7-
Content-Type: text/plain; charset="utf-8"
8-
Content-Transfer-Encoding: 7bit
3+
Date: Thu, 6 Feb 2025 10:21:38 -0700
4+
Subject: arm64: Handle .ARM.attributes section in linker scripts
95

106
A recent LLVM commit [1] started generating an .ARM.attributes section
117
similar to the one that exists for 32-bit, which results in orphan
@@ -26,32 +22,30 @@ the .note.gnu.property section.
2622
2723
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
2824
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
29-
Link: https://lore.kernel.org/r/20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org
3025
Signed-off-by: Nathan Chancellor <[email protected]>
26+
Link: https://lore.kernel.org/r/20250206-arm64-handle-arm-attributes-in-linker-script-v3-1-d53d169913eb@kernel.org
27+
Signed-off-by: Will Deacon <[email protected]>
3128
---
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
29+
Link: https://git.kernel.org/arm64/c/ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b
3630
---
3731
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
3832
arch/arm64/kernel/vmlinux.lds.S | 1 +
3933
2 files changed, 2 insertions(+)
4034

4135
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
42-
index 4ec32e86a8da..8095fef66209 100644
36+
index 4ec32e86a8da22..47ad6944f9f088 100644
4337
--- a/arch/arm64/kernel/vdso/vdso.lds.S
4438
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
45-
@@ -80,6 +80,7 @@ SECTIONS
46-
*(.data .data.* .gnu.linkonce.d.* .sdata*)
47-
*(.bss .sbss .dynbss .dynsbss)
48-
*(.eh_frame .eh_frame_hdr)
39+
@@ -41,6 +41,7 @@ SECTIONS
40+
*/
41+
/DISCARD/ : {
42+
*(.note.GNU-stack .note.gnu.property)
4943
+ *(.ARM.attributes)
5044
}
51-
}
45+
.note : { *(.note.*) } :text :note
5246

5347
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
54-
index f84c71f04d9e..e73326bd3ff7 100644
48+
index f84c71f04d9ea9..e73326bd3ff7e9 100644
5549
--- a/arch/arm64/kernel/vmlinux.lds.S
5650
+++ b/arch/arm64/kernel/vmlinux.lds.S
5751
@@ -162,6 +162,7 @@ SECTIONS
@@ -62,12 +56,6 @@ index f84c71f04d9e..e73326bd3ff7 100644
6256
}
6357

6458
. = KIMAGE_VADDR;
65-
66-
---
67-
base-commit: 1dd3393696efba1598aa7692939bba99d0cffae3
68-
change-id: 20250123-arm64-handle-arm-attributes-in-linker-script-82aee25313ac
69-
70-
Best regards,
7159
--
72-
Nathan Chancellor <[email protected]>
60+
cgit 1.2.3-korg
7361

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-
v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
2+
ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2.patch
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH v2] arm64: Handle .ARM.attributes section in linker scripts
1+
From ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b Mon Sep 17 00:00:00 2001
32
From: Nathan Chancellor <[email protected]>
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>
6-
MIME-Version: 1.0
7-
Content-Type: text/plain; charset="utf-8"
8-
Content-Transfer-Encoding: 7bit
3+
Date: Thu, 6 Feb 2025 10:21:38 -0700
4+
Subject: arm64: Handle .ARM.attributes section in linker scripts
95

106
A recent LLVM commit [1] started generating an .ARM.attributes section
117
similar to the one that exists for 32-bit, which results in orphan
@@ -26,32 +22,30 @@ the .note.gnu.property section.
2622
2723
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
2824
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
29-
Link: https://lore.kernel.org/r/20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org
3025
Signed-off-by: Nathan Chancellor <[email protected]>
26+
Link: https://lore.kernel.org/r/20250206-arm64-handle-arm-attributes-in-linker-script-v3-1-d53d169913eb@kernel.org
27+
Signed-off-by: Will Deacon <[email protected]>
3128
---
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
29+
Link: https://git.kernel.org/arm64/c/ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b
3630
---
3731
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
3832
arch/arm64/kernel/vmlinux.lds.S | 1 +
3933
2 files changed, 2 insertions(+)
4034

4135
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
42-
index 4ec32e86a8da..8095fef66209 100644
36+
index 4ec32e86a8da22..47ad6944f9f088 100644
4337
--- a/arch/arm64/kernel/vdso/vdso.lds.S
4438
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
45-
@@ -80,6 +80,7 @@ SECTIONS
46-
*(.data .data.* .gnu.linkonce.d.* .sdata*)
47-
*(.bss .sbss .dynbss .dynsbss)
48-
*(.eh_frame .eh_frame_hdr)
39+
@@ -41,6 +41,7 @@ SECTIONS
40+
*/
41+
/DISCARD/ : {
42+
*(.note.GNU-stack .note.gnu.property)
4943
+ *(.ARM.attributes)
5044
}
51-
}
45+
.note : { *(.note.*) } :text :note
5246

5347
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
54-
index f84c71f04d9e..e73326bd3ff7 100644
48+
index f84c71f04d9ea9..e73326bd3ff7e9 100644
5549
--- a/arch/arm64/kernel/vmlinux.lds.S
5650
+++ b/arch/arm64/kernel/vmlinux.lds.S
5751
@@ -162,6 +162,7 @@ SECTIONS
@@ -62,12 +56,6 @@ index f84c71f04d9e..e73326bd3ff7 100644
6256
}
6357

6458
. = KIMAGE_VADDR;
65-
66-
---
67-
base-commit: 1dd3393696efba1598aa7692939bba99d0cffae3
68-
change-id: 20250123-arm64-handle-arm-attributes-in-linker-script-82aee25313ac
69-
70-
Best regards,
7159
--
72-
Nathan Chancellor <[email protected]>
60+
cgit 1.2.3-korg
7361

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-
v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
2+
ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2.patch
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH v2] arm64: Handle .ARM.attributes section in linker scripts
1+
From ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b Mon Sep 17 00:00:00 2001
32
From: Nathan Chancellor <[email protected]>
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>
6-
MIME-Version: 1.0
7-
Content-Type: text/plain; charset="utf-8"
8-
Content-Transfer-Encoding: 7bit
3+
Date: Thu, 6 Feb 2025 10:21:38 -0700
4+
Subject: arm64: Handle .ARM.attributes section in linker scripts
95

106
A recent LLVM commit [1] started generating an .ARM.attributes section
117
similar to the one that exists for 32-bit, which results in orphan
@@ -26,32 +22,30 @@ the .note.gnu.property section.
2622
2723
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
2824
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
29-
Link: https://lore.kernel.org/r/20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org
3025
Signed-off-by: Nathan Chancellor <[email protected]>
26+
Link: https://lore.kernel.org/r/20250206-arm64-handle-arm-attributes-in-linker-script-v3-1-d53d169913eb@kernel.org
27+
Signed-off-by: Will Deacon <[email protected]>
3128
---
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
29+
Link: https://git.kernel.org/arm64/c/ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b
3630
---
3731
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
3832
arch/arm64/kernel/vmlinux.lds.S | 1 +
3933
2 files changed, 2 insertions(+)
4034

4135
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
42-
index 4ec32e86a8da..8095fef66209 100644
36+
index 4ec32e86a8da22..47ad6944f9f088 100644
4337
--- a/arch/arm64/kernel/vdso/vdso.lds.S
4438
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
45-
@@ -80,6 +80,7 @@ SECTIONS
46-
*(.data .data.* .gnu.linkonce.d.* .sdata*)
47-
*(.bss .sbss .dynbss .dynsbss)
48-
*(.eh_frame .eh_frame_hdr)
39+
@@ -41,6 +41,7 @@ SECTIONS
40+
*/
41+
/DISCARD/ : {
42+
*(.note.GNU-stack .note.gnu.property)
4943
+ *(.ARM.attributes)
5044
}
51-
}
45+
.note : { *(.note.*) } :text :note
5246

5347
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
54-
index f84c71f04d9e..e73326bd3ff7 100644
48+
index f84c71f04d9ea9..e73326bd3ff7e9 100644
5549
--- a/arch/arm64/kernel/vmlinux.lds.S
5650
+++ b/arch/arm64/kernel/vmlinux.lds.S
5751
@@ -162,6 +162,7 @@ SECTIONS
@@ -62,12 +56,6 @@ index f84c71f04d9e..e73326bd3ff7 100644
6256
}
6357

6458
. = KIMAGE_VADDR;
65-
66-
---
67-
base-commit: 1dd3393696efba1598aa7692939bba99d0cffae3
68-
change-id: 20250123-arm64-handle-arm-attributes-in-linker-script-82aee25313ac
69-
70-
Best regards,
7159
--
72-
Nathan Chancellor <[email protected]>
60+
cgit 1.2.3-korg
7361

patches/android-mainline/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
1+
ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2.patch
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH v2] arm64: Handle .ARM.attributes section in linker scripts
1+
From ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b Mon Sep 17 00:00:00 2001
32
From: Nathan Chancellor <[email protected]>
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>
6-
MIME-Version: 1.0
7-
Content-Type: text/plain; charset="utf-8"
8-
Content-Transfer-Encoding: 7bit
3+
Date: Thu, 6 Feb 2025 10:21:38 -0700
4+
Subject: arm64: Handle .ARM.attributes section in linker scripts
95

106
A recent LLVM commit [1] started generating an .ARM.attributes section
117
similar to the one that exists for 32-bit, which results in orphan
@@ -26,32 +22,30 @@ the .note.gnu.property section.
2622
2723
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
2824
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
29-
Link: https://lore.kernel.org/r/20250204-arm64-handle-arm-attributes-in-linker-script-v2-1-d684097f5554@kernel.org
3025
Signed-off-by: Nathan Chancellor <[email protected]>
26+
Link: https://lore.kernel.org/r/20250206-arm64-handle-arm-attributes-in-linker-script-v3-1-d53d169913eb@kernel.org
27+
Signed-off-by: Will Deacon <[email protected]>
3128
---
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
29+
Link: https://git.kernel.org/arm64/c/ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b
3630
---
3731
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
3832
arch/arm64/kernel/vmlinux.lds.S | 1 +
3933
2 files changed, 2 insertions(+)
4034

4135
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
42-
index 4ec32e86a8da..8095fef66209 100644
36+
index 4ec32e86a8da22..47ad6944f9f088 100644
4337
--- a/arch/arm64/kernel/vdso/vdso.lds.S
4438
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
45-
@@ -80,6 +80,7 @@ SECTIONS
46-
*(.data .data.* .gnu.linkonce.d.* .sdata*)
47-
*(.bss .sbss .dynbss .dynsbss)
48-
*(.eh_frame .eh_frame_hdr)
39+
@@ -41,6 +41,7 @@ SECTIONS
40+
*/
41+
/DISCARD/ : {
42+
*(.note.GNU-stack .note.gnu.property)
4943
+ *(.ARM.attributes)
5044
}
51-
}
45+
.note : { *(.note.*) } :text :note
5246

5347
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
54-
index f84c71f04d9e..e73326bd3ff7 100644
48+
index f84c71f04d9ea9..e73326bd3ff7e9 100644
5549
--- a/arch/arm64/kernel/vmlinux.lds.S
5650
+++ b/arch/arm64/kernel/vmlinux.lds.S
5751
@@ -162,6 +162,7 @@ SECTIONS
@@ -62,12 +56,6 @@ index f84c71f04d9e..e73326bd3ff7 100644
6256
}
6357

6458
. = KIMAGE_VADDR;
65-
66-
---
67-
base-commit: 1dd3393696efba1598aa7692939bba99d0cffae3
68-
change-id: 20250123-arm64-handle-arm-attributes-in-linker-script-82aee25313ac
69-
70-
Best regards,
7159
--
72-
Nathan Chancellor <[email protected]>
60+
cgit 1.2.3-korg
7361

patches/android15-6.6/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2_20250204_nathan_arm64_handle_arm_attributes_section_in_linker_scripts.patch
1+
ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2.patch
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
From ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b Mon Sep 17 00:00:00 2001
2+
From: Nathan Chancellor <[email protected]>
3+
Date: Thu, 6 Feb 2025 10:21:38 -0700
4+
Subject: arm64: Handle .ARM.attributes section in linker scripts
5+
6+
A recent LLVM commit [1] started generating an .ARM.attributes section
7+
similar to the one that exists for 32-bit, which results in orphan
8+
section warnings (or errors if CONFIG_WERROR is enabled) from the linker
9+
because it is not handled in the arm64 linker scripts.
10+
11+
ld.lld: error: arch/arm64/kernel/vdso/vgettimeofday.o:(.ARM.attributes) is being placed in '.ARM.attributes'
12+
ld.lld: error: arch/arm64/kernel/vdso/vgetrandom.o:(.ARM.attributes) is being placed in '.ARM.attributes'
13+
14+
ld.lld: error: vmlinux.a(lib/vsprintf.o):(.ARM.attributes) is being placed in '.ARM.attributes'
15+
ld.lld: error: vmlinux.a(lib/win_minmax.o):(.ARM.attributes) is being placed in '.ARM.attributes'
16+
ld.lld: error: vmlinux.a(lib/xarray.o):(.ARM.attributes) is being placed in '.ARM.attributes'
17+
18+
Discard the new sections in the necessary linker scripts to resolve the
19+
warnings, as the kernel and vDSO do not need to retain it, similar to
20+
the .note.gnu.property section.
21+
22+
23+
Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement")
24+
Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1]
25+
Signed-off-by: Nathan Chancellor <[email protected]>
26+
Link: https://lore.kernel.org/r/20250206-arm64-handle-arm-attributes-in-linker-script-v3-1-d53d169913eb@kernel.org
27+
Signed-off-by: Will Deacon <[email protected]>
28+
---
29+
Link: https://git.kernel.org/arm64/c/ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b
30+
---
31+
arch/arm64/kernel/vdso/vdso.lds.S | 1 +
32+
arch/arm64/kernel/vmlinux.lds.S | 1 +
33+
2 files changed, 2 insertions(+)
34+
35+
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
36+
index 4ec32e86a8da22..47ad6944f9f088 100644
37+
--- a/arch/arm64/kernel/vdso/vdso.lds.S
38+
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
39+
@@ -41,6 +41,7 @@ SECTIONS
40+
*/
41+
/DISCARD/ : {
42+
*(.note.GNU-stack .note.gnu.property)
43+
+ *(.ARM.attributes)
44+
}
45+
.note : { *(.note.*) } :text :note
46+
47+
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
48+
index f84c71f04d9ea9..e73326bd3ff7e9 100644
49+
--- a/arch/arm64/kernel/vmlinux.lds.S
50+
+++ b/arch/arm64/kernel/vmlinux.lds.S
51+
@@ -162,6 +162,7 @@ SECTIONS
52+
/DISCARD/ : {
53+
*(.interp .dynamic)
54+
*(.dynsym .dynstr .hash .gnu.hash)
55+
+ *(.ARM.attributes)
56+
}
57+
58+
. = KIMAGE_VADDR;
59+
--
60+
cgit 1.2.3-korg
61+

patches/arm64/series

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

0 commit comments

Comments
 (0)