kbuild: -ffunction-sections fix for archs with conflicting sections
authorNicholas Piggin <npiggin@gmail.com>
Wed, 14 Sep 2016 02:24:03 +0000 (12:24 +1000)
committerMichal Marek <mmarek@suse.com>
Thu, 22 Sep 2016 12:37:14 +0000 (14:37 +0200)
commit0f4c4af06eec5717041d6fe568b80ee4cf3c1475
tree6e6960b1b8fdda70d042f4edda0001818db0c8e3
parentfbe6e37dab974dd0fc3660c001895f7bfd771c9a
kbuild: -ffunction-sections fix for archs with conflicting sections

Enabling -ffunction-sections modified the generic linker script to
pull .text.* sections into regular TEXT_TEXT section, conflicting
with some architectures. Revert that change and require archs that
enable the option to ensure they have no conflicting section names,
and do the appropriate merging.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Fixes: b67067f1176d ("kbuild: allow archs to select link dead code/data elimination")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
arch/Kconfig
include/asm-generic/vmlinux.lds.h