arm/build: Always handle .ARM.exidx and .ARM.extab sections
PATCH 1/1 arm/build: Always handle .ARM.exidx and .ARM.extab sections
After turning on warnings for orphan section placement, enabling CONFIG_UNWINDER_FRAME_POINTER instead of CONFIG_UNWINDER_ARM causes thousands of warnings when clang + ld.lld are used:
$ scripts/config --file arch/arm/configs/multi_v7_defconfig \
-d CONFIG_UNWINDER_ARM \
-e CONFIG_UNWINDER_FRAME_POINTER
$ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 defconfig zImage
ld.lld: warning: init/built-in.a(main.o):(.ARM.extab) is being placed in '.ARM.extab'
ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.ref.text) is being placed in '.ARM.extab.ref.text'
ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab) is being placed in '.ARM.extab'
ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab) is being placed in '.ARM.extab'
ld.lld: warning: init/built-in.a(do_mounts_initrd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab) is being placed in '.ARM.extab'
ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab) is being placed in '.ARM.extab'These sections are handled by the ARM_UNWIND_SECTIONS define, which is only added to the list of sections when CONFIG_ARM_UNWIND is set. CONFIG_ARM_UNWIND is a hidden symbol that is only selected when CONFIG_UNWINDER_ARM is set so CONFIG_UNWINDER_FRAME_POINTER never handles these sections. According to the help text of CONFIG_UNWINDER_ARM, these sections should be discarded so that the kernel image size is not affected.
--- arch/arm/kernel/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/kernel/vmlinux.lds.S +4 -0
@@ -40,6 +40,10 @@ SECTIONS ARM_DISCARD #ifndef CONFIG_SMP_ON_UP *(.alt.smp.init) +#endif +#ifndef CONFIG_ARM_UNWIND + *(.ARM.exidx*) + *(.ARM.extab*) #endif }
base-commit: 6e0bf0e0e55000742a53c5f3b58f8669e0091a11
Signature · 7 lines
2.28.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 22 lines · Nathan Chancellor
After turning on warnings for orphan section placement, enabling
CONFIG_UNWINDER_FRAME_POINTERinstead ofCONFIG_UNWINDER_ARMcauses thousands of warnings when clang + ld.lld are used:$ scripts/config --file arch/arm/configs/multi_v7_defconfig \ -d CONFIG_UNWINDER_ARM \ -e CONFIG_UNWINDER_FRAME_POINTER $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 defconfig zImage ld.lld: warning: init/built-in.a(main.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.ref.text) is being placed in '.ARM.extab.ref.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_initrd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab) is being placed in '.ARM.extab'
Quoted 7 lines
These sections are handled by the
ARM_UNWIND_SECTIONSdefine, which is only added to the list of sections whenCONFIG_ARM_UNWINDis set.CONFIG_ARM_UNWINDis a hidden symbol that is only selected whenCONFIG_UNWINDER_ARMis set soCONFIG_UNWINDER_FRAME_POINTERnever handles these sections. According to the help text ofCONFIG_UNWINDER_ARM, these sections should be discarded so that the kernel image size is not affected.
My apologies for taking so long to review this.
I have a suspicion that these come from forcing on configs that Kconfig/menuconfig would block, and aren't clang or lld specific, yet are exposed by the new linker warnings for orphan section placement (good). That said, we definitely have OEMs in Android land that still prefer the older unwinder.
From https://developer.arm.com/documentation/ihi0038/b/ (click download in top left), section 4.4.1 "Sections" has a note:
``` Tables are not required for ABI compliance at the C/Assembler level but are required for C++. ```
Please submit to:
https://www.arm.linux.org.uk/developer/patches/add.php
Quoted 14 lines
Fixes 5a17850e251a ("arm/build: Warn on orphan section placement")Reported-by kernel test robot <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>--- arch/arm/kernel/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/kernel/vmlinux.lds.S +0
-0
arch/arm/kernel/vmlinux.lds.S SECTIONS · line 45
Quoted 6 lines
arch/arm/kernel/vmlinux.lds.S +3
-0@@ -40,6 +40,10 @@ SECTIONS ARM_DISCARD #ifndef CONFIG_SMP_ON_UP *(.alt.smp.init) +#endif +#ifndef CONFIG_ARM_UNWIND + *(.ARM.exidx*)
I don't think we need the wildcard, as without this line, I see:
ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'
though I do see binutils linker scripts use precisely what you have. So I guess that's fine.
I guess we can't reuse ARM_UNWIND_SECTIONS since the ALIGN and linker-script-defined-symbols would be weird in a DISCARD clause?
Quoted 7 lines
arch/arm/kernel/vmlinux.lds.S +1
-0+ *(.ARM.extab*) #endif }base-commit:
6e0bf0e0e55000742a53c5f3b58f8669e0091a11--
--
Thanks,
~Nick Desaulniers
Quoted 78 lines · Nick Desaulniers' via Clang Built Linux
Quoted 22 lines · Nathan Chancellor
After turning on warnings for orphan section placement, enabling
CONFIG_UNWINDER_FRAME_POINTERinstead ofCONFIG_UNWINDER_ARMcauses thousands of warnings when clang + ld.lld are used:$ scripts/config --file arch/arm/configs/multi_v7_defconfig \ -d CONFIG_UNWINDER_ARM \ -e CONFIG_UNWINDER_FRAME_POINTER $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 defconfig zImage ld.lld: warning: init/built-in.a(main.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.ref.text) is being placed in '.ARM.extab.ref.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_initrd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab) is being placed in '.ARM.extab'Quoted 7 lines
These sections are handled by the
ARM_UNWIND_SECTIONSdefine, which is only added to the list of sections whenCONFIG_ARM_UNWINDis set.CONFIG_ARM_UNWINDis a hidden symbol that is only selected whenCONFIG_UNWINDER_ARMis set soCONFIG_UNWINDER_FRAME_POINTERnever handles these sections. According to the help text ofCONFIG_UNWINDER_ARM, these sections should be discarded so that the kernel image size is not affected.My apologies for taking so long to review this.
I have a suspicion that these come from forcing on configs that Kconfig/menuconfig would block, and aren't clang or lld specific, yet are exposed by the new linker warnings for orphan section placement (good). That said, we definitely have OEMs in Android land that still prefer the older unwinder.
From https://developer.arm.com/documentation/ihi0038/b/ (click download in top left), section 4.4.1 "Sections" has a note:
``` Tables are not required for ABI compliance at the C/Assembler level but are required for C++. ```Review-by Nick Desaulniers <[email protected]>Tested-by Nick Desaulniers <[email protected]>Please submit to:
https://www.arm.linux.org.uk/developer/patches/add.phpQuoted 14 lines
Fixes 5a17850e251a ("arm/build: Warn on orphan section placement")Reported-by kernel test robot <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>--- arch/arm/kernel/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/kernel/vmlinux.lds.S +0
-0arch/arm/kernel/vmlinux.lds.S SECTIONS · line 45
Quoted 6 lines
arch/arm/kernel/vmlinux.lds.S +3
-0@@ -40,6 +40,10 @@ SECTIONS ARM_DISCARD #ifndef CONFIG_SMP_ON_UP *(.alt.smp.init) +#endif +#ifndef CONFIG_ARM_UNWIND + *(.ARM.exidx*)I don't think we need the wildcard, as without this line, I see:
Quoted 1 line
ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'
We may need the wildcard if there are -ffunction-sections builds. In clang, .ARM.exidx* cannot be removed even with -fno-unwind-tables -fno-exceptions.
Quoted 24 lines
though I do see binutils linker scripts use precisely what you have. So I guess that's fine.
I guess we can't reuse
ARM_UNWIND_SECTIONSsince the ALIGN and linker-script-defined-symbols would be weird in a DISCARD clause?Quoted 7 lines
arch/arm/kernel/vmlinux.lds.S +1
-0+ *(.ARM.extab*) #endif }base-commit:
6e0bf0e0e55000742a53c5f3b58f8669e0091a11----
Thanks,
~Nick Desaulniers--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAKwvOd%3D%2B98r6F4JjrPEoWX88WQ%3DB-KMRP2eWojabLk6it3i5KA%40mail.gmail.com.
Signature · 1 line
宋方睿
Quoted 80 lines · Fāng-ruì Sòng
Quoted 78 lines · Nick Desaulniers' via Clang Built Linux
Quoted 22 lines · Nathan Chancellor
After turning on warnings for orphan section placement, enabling
CONFIG_UNWINDER_FRAME_POINTERinstead ofCONFIG_UNWINDER_ARMcauses thousands of warnings when clang + ld.lld are used:$ scripts/config --file arch/arm/configs/multi_v7_defconfig \ -d CONFIG_UNWINDER_ARM \ -e CONFIG_UNWINDER_FRAME_POINTER $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 defconfig zImage ld.lld: warning: init/built-in.a(main.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.ref.text) is being placed in '.ARM.extab.ref.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_initrd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab) is being placed in '.ARM.extab'Quoted 7 lines
These sections are handled by the
ARM_UNWIND_SECTIONSdefine, which is only added to the list of sections whenCONFIG_ARM_UNWINDis set.CONFIG_ARM_UNWINDis a hidden symbol that is only selected whenCONFIG_UNWINDER_ARMis set soCONFIG_UNWINDER_FRAME_POINTERnever handles these sections. According to the help text ofCONFIG_UNWINDER_ARM, these sections should be discarded so that the kernel image size is not affected.My apologies for taking so long to review this.
I have a suspicion that these come from forcing on configs that Kconfig/menuconfig would block, and aren't clang or lld specific, yet are exposed by the new linker warnings for orphan section placement (good). That said, we definitely have OEMs in Android land that still prefer the older unwinder.
From https://developer.arm.com/documentation/ihi0038/b/ (click download in top left), section 4.4.1 "Sections" has a note:
``` Tables are not required for ABI compliance at the C/Assembler level but are required for C++. ```Review-by Nick Desaulniers <[email protected]>Tested-by Nick Desaulniers <[email protected]>Please submit to:
https://www.arm.linux.org.uk/developer/patches/add.phpQuoted 14 lines
Fixes 5a17850e251a ("arm/build: Warn on orphan section placement")Reported-by kernel test robot <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>--- arch/arm/kernel/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/kernel/vmlinux.lds.S +0
-0arch/arm/kernel/vmlinux.lds.S SECTIONS · line 45
Quoted 6 lines
arch/arm/kernel/vmlinux.lds.S +3
-0@@ -40,6 +40,10 @@ SECTIONS ARM_DISCARD #ifndef CONFIG_SMP_ON_UP *(.alt.smp.init) +#endif +#ifndef CONFIG_ARM_UNWIND + *(.ARM.exidx*)I don't think we need the wildcard, as without this line, I see:
Quoted 5 lines
Quoted 1 line
ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'
We may need the wildcard if there are -ffunction-sections builds. In clang, .ARM.exidx* cannot be removed even with -fno-unwind-tables -fno-exceptions.
Does it need to be:
*(.ARM.exidx) *(.ARM.exidx.*) *(.ARM.extab) *(.ARM.extab.*)
?
Quoted 30 lines
Quoted 25 lines
though I do see binutils linker scripts use precisely what you have. So I guess that's fine.
I guess we can't reuse
ARM_UNWIND_SECTIONSsince the ALIGN and linker-script-defined-symbols would be weird in a DISCARD clause?Quoted 7 lines
arch/arm/kernel/vmlinux.lds.S +1
-0+ *(.ARM.extab*) #endif }base-commit:
6e0bf0e0e55000742a53c5f3b58f8669e0091a11----
Thanks,
~Nick Desaulniers--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAKwvOd%3D%2B98r6F4JjrPEoWX88WQ%3DB-KMRP2eWojabLk6it3i5KA%40mail.gmail.com.Signature · 1 line
宋方睿
Signature · 1 line
Kees Cook
Quoted 52 lines · Kees Cook
Quoted 51 lines · Fāng-ruì Sòng
Quoted 49 lines · Nick Desaulniers' via Clang Built Linux
Quoted 22 lines · Nathan Chancellor
After turning on warnings for orphan section placement, enabling
CONFIG_UNWINDER_FRAME_POINTERinstead ofCONFIG_UNWINDER_ARMcauses thousands of warnings when clang + ld.lld are used:$ scripts/config --file arch/arm/configs/multi_v7_defconfig \ -d CONFIG_UNWINDER_ARM \ -e CONFIG_UNWINDER_FRAME_POINTER $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 defconfig zImage ld.lld: warning: init/built-in.a(main.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.ref.text) is being placed in '.ARM.extab.ref.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_initrd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab) is being placed in '.ARM.extab'Quoted 7 lines
These sections are handled by the
ARM_UNWIND_SECTIONSdefine, which is only added to the list of sections whenCONFIG_ARM_UNWINDis set.CONFIG_ARM_UNWINDis a hidden symbol that is only selected whenCONFIG_UNWINDER_ARMis set soCONFIG_UNWINDER_FRAME_POINTERnever handles these sections. According to the help text ofCONFIG_UNWINDER_ARM, these sections should be discarded so that the kernel image size is not affected.My apologies for taking so long to review this.
I have a suspicion that these come from forcing on configs that Kconfig/menuconfig would block, and aren't clang or lld specific, yet are exposed by the new linker warnings for orphan section placement (good). That said, we definitely have OEMs in Android land that still prefer the older unwinder.
From https://developer.arm.com/documentation/ihi0038/b/ (click download in top left), section 4.4.1 "Sections" has a note:
``` Tables are not required for ABI compliance at the C/Assembler level but are required for C++. ```
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Review-by Nick Desaulniers <[email protected]>Tested-by Nick Desaulniers <[email protected]>Please submit to:
https://www.arm.linux.org.uk/developer/patches/add.php
This should go through the tip tree (hence sending it straight to Ingo) since the patch that this fixes was there. I guess it does not necessarily matter now that the breakage is in mainline but basing a set of patches on a non -rc tag is a little taboo I thought so not sure it is appropriate to go through Russell for now. It is up to the maintainers though, I will submit it wherever it needs to go.
Quoted 29 lines
Quoted 23 lines
Quoted 23 lines
Quoted 14 lines
Fixes 5a17850e251a ("arm/build: Warn on orphan section placement")Reported-by kernel test robot <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>--- arch/arm/kernel/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/kernel/vmlinux.lds.S +0
-0arch/arm/kernel/vmlinux.lds.S SECTIONS · line 45
Quoted 6 lines
arch/arm/kernel/vmlinux.lds.S +3
-0@@ -40,6 +40,10 @@ SECTIONS ARM_DISCARD #ifndef CONFIG_SMP_ON_UP *(.alt.smp.init) +#endif +#ifndef CONFIG_ARM_UNWIND + *(.ARM.exidx*)I don't think we need the wildcard, as without this line, I see:
Quoted 5 lines
Quoted 1 line
ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'
We may need the wildcard if there are -ffunction-sections builds. In clang, .ARM.exidx* cannot be removed even with -fno-unwind-tables -fno-exceptions.
Quoted 6 lines
Does it need to be:
*(.ARM.exidx) *(.ARM.exidx.*) *(.ARM.extab) *(.ARM.extab.*)?
I tested the patch and saw no warnings with what I sent. I can change it to that if it is more proper though!
Quoted 28 lines
Quoted 28 lines
Quoted 25 lines
though I do see binutils linker scripts use precisely what you have. So I guess that's fine.
I guess we can't reuse
ARM_UNWIND_SECTIONSsince the ALIGN and linker-script-defined-symbols would be weird in a DISCARD clause?Quoted 7 lines
arch/arm/kernel/vmlinux.lds.S +1
-0+ *(.ARM.extab*) #endif }base-commit:
6e0bf0e0e55000742a53c5f3b58f8669e0091a11----
Thanks,
~Nick Desaulniers--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAKwvOd%3D%2B98r6F4JjrPEoWX88WQ%3DB-KMRP2eWojabLk6it3i5KA%40mail.gmail.com.
Quoted 5 lines
Quoted 2 lines
Signature · 1 line
宋方睿Signature · 1 line
Kees Cook
Cheers,
Nathan
Quoted 9 lines · Nathan Chancellor
Quoted 6 lines · Kees Cook
Quoted 5 lines · Fāng-ruì Sòng
Quoted 3 lines · Nick Desaulniers' via Clang Built Linux
Please submit to:
https://www.arm.linux.org.uk/developer/patches/add.php
Quoted 6 lines
This should go through the tip tree (hence sending it straight to Ingo) since the patch that this fixes was there. I guess it does not necessarily matter now that the breakage is in mainline but basing a set of patches on a non -rc tag is a little taboo I thought so not sure it is appropriate to go through Russell for now. It is up to the maintainers though, I will submit it wherever it needs to go.
Ah got it, yeah I don't really care which tree this goes up in.
Quoted 32 lines
Quoted 32 lines
Quoted 24 lines
Quoted 24 lines
Quoted 15 lines
Fixes 5a17850e251a ("arm/build: Warn on orphan section placement")Reported-by kernel test robot <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>--- arch/arm/kernel/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/kernel/vmlinux.lds.S +0
-0arch/arm/kernel/vmlinux.lds.S SECTIONS · line 45
Quoted 6 lines
arch/arm/kernel/vmlinux.lds.S +3
-0@@ -40,6 +40,10 @@ SECTIONS ARM_DISCARD #ifndef CONFIG_SMP_ON_UP *(.alt.smp.init) +#endif +#ifndef CONFIG_ARM_UNWIND + *(.ARM.exidx*)I don't think we need the wildcard, as without this line, I see:
Quoted 5 lines
Quoted 1 line
ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'
We may need the wildcard if there are -ffunction-sections builds. In clang, .ARM.exidx* cannot be removed even with -fno-unwind-tables -fno-exceptions.
Does it need to be:
Quoted 7 lines
Quoted 4 lines
*(.ARM.exidx) *(.ARM.exidx.*) *(.ARM.extab) *(.ARM.extab.*)?
I tested the patch and saw no warnings with what I sent. I can change it to that if it is more proper though!
We don't have LTO working on 32b ARM yet, so I'm not worried about -ffunction-sections for this (yet). The ld.bfd linker scripts didn't seem to use the non-wildcard and wildcard suggestion; just the wildcarded. (Maybe they have the same "bug?") I'm happy to revisit though if we plan to get LTO up and running on 32b ARM.
Signature · 7 lines
Thanks, ~Nick Desaulniers _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel