]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: Fix VDSO build with older binutils.
authorDavid S. Miller <davem@davemloft.net>
Thu, 25 Oct 2018 17:36:19 +0000 (10:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Oct 2018 17:36:19 +0000 (10:36 -0700)
commit387c84b8a493f38121ef3fc7bf74ad6f574a7052
treeead06508c7fc91d86b0c0d302abd43110f32a056
parent8258db22641c8449a7d17f768219fc6590d20028
sparc: Fix VDSO build with older binutils.

Older versions of bintutils do not allow symbol math across different
segments on sparc:

====================
Assembler messages:
99: Error: operation combines symbols in different segments
====================

This is controlled by whether or not DIFF_EXPR_OK is defined in
gas/config/tc-*.h and for sparc this was not the case until mid-2017.

So we have to patch between %stick and %tick another way.

Do what powerpc does and emit two versions of the relevant functions,
one using %tick and one using %stick, and patch the symbols in the
dynamic symbol table.

Fixes: 7278ea185753 ("sparc: Improve VDSO instruction patching.")
Reported-by: Meelis Roos <mroos@linux.ee>
Tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/vdso.h
arch/sparc/vdso/vclock_gettime.c
arch/sparc/vdso/vdso-layout.lds.S
arch/sparc/vdso/vdso.lds.S
arch/sparc/vdso/vdso2c.h
arch/sparc/vdso/vdso32/vdso32.lds.S
arch/sparc/vdso/vma.c