Skip to content

Commit acd35db

Browse files
committed
powerpc/vmlinux.lds: Add .text.asan/tsan sections
When KASAN/KCSAN are enabled clang generates .text.asan/tsan sections. Because they are not mentioned in the linker script warnings are generated, and when orphan handling is set to error that becomes a build error, eg: ld.lld: error: vmlinux.a(init/main.o):(.text.tsan.module_ctor) is being placed in '.text.tsan.module_ctor' ld.lld: error: vmlinux.a(init/version.o):(.text.tsan.module_ctor) is being placed in '.text.tsan.module_ctor' Fix it by adding the sections to our linker script, similar to the generic change made in 8483788 ("vmlinux.lds.h: Handle clang's module.{c,d}tor sections"). Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d8c3285 commit acd35db

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/powerpc/kernel/vmlinux.lds.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ SECTIONS
124124
* included with the main text sections, so put it by itself.
125125
*/
126126
*(.sfpr);
127+
*(.text.asan.* .text.tsan.*)
127128
MEM_KEEP(init.text)
128129
MEM_KEEP(exit.text)
129130
} :text

0 commit comments

Comments
 (0)