arch/powerpc/kernel/vdso32/gettimeofday.S:40: Error: syntax error; found `@', expected `,'
Quoted 22 lines · Segher Boessenkool
Quoted 6 lines · Nick Desaulniers
Quoted 1 line · Segher Boessenkool
Yes, and @local isn't new either.
The first issue is that
arch/powerpc/kernel/vdso32/Makefileresets the cflags that we very carefully constructed in the top levelMakefile.Or, it could be said you are relying on no one else daring to touch a generic variable ;-)
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
A new clang issue ? This code has been there for years and been building with success with GNU tools.
Does the clang integrated assembler handle embedded relocations at all?
I believe so, but each ISA may have different levels of support for all of the different possible relocation types. TBH, I have not yet tested Clang's integrated assembler with PPC. These are to avoid GOT indirection?
Quoted 8 lines
This is the 32-bit @local relocation; its history predates binutils CVS (so older than 1999). It is the same as @local24pc (which is documented in even the oldest ABI documents). It *uses* the GOT (or PLT).
If you do have @local24pc, just add an alias @local for it?
Segher
R_PPC_LOCAL24PC is a legacy thing. GCC appears to emit it when referencing hidden/internal/local symbols. It was invented probably because a couple of decades ago people think having relocation types to encode symbol properties was a good idea. This is not useful because symbol information can change when merging information from other translation units (a default visibility can become hidden). Such properties are really the symbols', and not the relocation types'. ppc64 has unified R_PPC_LOCAL24PC/R_PPC_REL24/R_PPC_PLTREL24.
When I implemented R_PPC_LOCAL24PC for LLD
(https://reviews.llvm.org/D62464 ) I simply treated it as an alias for R_PPC_REL24.
It is clear that LLVM integrated assembler needs to support @local24pc .... There isn't even a test case in binutils-gdb.
If there is a @local24pc use case, just change it to @local. The suffix can probably be deleted as well.