MIPS: Fix genvdso error on rebuild
authorJames Hogan <james.hogan@imgtec.com>
Fri, 13 May 2016 18:41:06 +0000 (19:41 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 20:47:39 +0000 (22:47 +0200)
commit2afb97454347f641dd2435a3956ba12f816fb1df
tree60dc1b929cb56b69eb0a08a0de6e028aa806b5a7
parentb071c5d7998a79919e83565ddfb98fdf6fa804bc
MIPS: Fix genvdso error on rebuild

The genvdso program modifies the debug and stripped versions of the
VDSOs in place, and errors if the modification has already taken place.
Unfortunately this means that a rebuild which tries to rerun genvdso to
generate vdso*-image.c without also rebuilding vdso.so.dbg (for example
if genvdso.c is modified) hits a build error like this:

arch/mips/vdso/genvdso 'arch/mips/vdso/vdso.so.dbg' already contains a '.MIPS.abiflags' section

This is fixed by reorganising the rules such that unmodified .so files
have a .raw suffix, and these are copied in the same rule that runs
genvdso on the copies.

I.e. previously we had:

 cmd_vdsold:
  link objects -> vdso.so.dbg

 cmd_genvdso:
  strip vdso.so.dbg -> vdso.so
  run genvdso -> vdso-image.c
   and modify vdso.so.dbg and vdso.so in place

Now we have:

 cmd_vdsold:
  link objects -> vdso.so.dbg.raw

 a new cmd_objcopy based strip rule (inspired by ARM):
  strip vdso.so.dbg.raw -> vdso.so.raw

 cmd_genvdso:
  copy vdso.so.dbg.raw -> vdso.so.dbg
  copy vdso.so.raw -> vdso.so
  run genvdso -> vdso-image.c
   and modify vdso.so.dbg and vdso.so in place

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13250/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/vdso/Makefile
This page took 0.032523 seconds and 5 git commands to generate.