kernel_optimize_test/arch/riscv/kernel/vdso
Aurelien Jarno 85602bea29
RISC-V: build vdso-dummy.o with -no-pie
Debian toolcahin defaults to PIE, and I guess that will also be the case
of most distributions. This causes the following build failure:

  AS      arch/riscv/kernel/vdso/getcpu.o
  AS      arch/riscv/kernel/vdso/flush_icache.o
  VDSOLD  arch/riscv/kernel/vdso/vdso.so.dbg
  OBJCOPY arch/riscv/kernel/vdso/vdso.so
  AS      arch/riscv/kernel/vdso/vdso.o
  VDSOLD  arch/riscv/kernel/vdso/vdso-dummy.o
  LD      arch/riscv/kernel/vdso/vdso-syms.o
riscv64-linux-gnu-ld: attempted static link of dynamic object `arch/riscv/kernel/vdso/vdso-dummy.o'
make[2]: *** [arch/riscv/kernel/vdso/Makefile:43: arch/riscv/kernel/vdso/vdso-syms.o] Error 1
make[1]: *** [scripts/Makefile.build:575: arch/riscv/kernel/vdso] Error 2
make: *** [Makefile:1018: arch/riscv/kernel] Error 2

While the root Makefile correctly passes "-fno-PIE" to build individual
object files, the RISC-V kernel also builds vdso-dummy.o as an
executable, which is therefore linked as PIE. Fix that by updating this
specific link rule to also include "-no-pie".

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2018-04-24 10:54:46 -07:00
..
.gitignore
clock_getres.S RISC-V: Add VDSO entries for clock_get/gettimeofday/getcpu 2017-11-27 07:51:39 -08:00
clock_gettime.S RISC-V: Add VDSO entries for clock_get/gettimeofday/getcpu 2017-11-27 07:51:39 -08:00
flush_icache.S RISC-V: Make __NR_riscv_flush_icache visible to userspace 2018-01-07 15:14:37 -08:00
getcpu.S RISC-V: Add VDSO entries for clock_get/gettimeofday/getcpu 2017-11-27 07:51:39 -08:00
gettimeofday.S RISC-V: Add VDSO entries for clock_get/gettimeofday/getcpu 2017-11-27 07:51:39 -08:00
Makefile RISC-V: build vdso-dummy.o with -no-pie 2018-04-24 10:54:46 -07:00
rt_sigreturn.S
vdso.lds.S RISC-V: Allow userspace to flush the instruction cache 2017-11-30 12:58:29 -08:00
vdso.S