]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/boot/wrapper: Add "-z notext" flag to disable diagnostic
authorBill Wendling <morbo@google.com>
Fri, 20 Nov 2020 22:40:32 +0000 (14:40 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 26 Nov 2020 11:05:43 +0000 (22:05 +1100)
commitf4b3243f8dc4042bd3743cbca0a90969329f0301
treea43466fda639be679c4ad5d4ebfdd56fad3498f1
parenta273a0be6f34f48af79e14c675c9692cef31b61b
powerpc/boot/wrapper: Add "-z notext" flag to disable diagnostic

The "-z notext" flag disables reporting an error if DT_TEXTREL is set.

  ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64 against
    symbol: _start in readonly segment; recompile object files with
    -fPIC or pass '-Wl,-z,notext' to allow text relocations in the
    output
  >>> defined in
  >>> referenced by crt0.o:(.text+0x8) in archive arch/powerpc/boot/wrapper.a

The BFD linker disables this by default (though it's configurable in
current versions). LLD enables this by default. So we add the flag to
keep LLD from emitting the error.

Signed-off-by: Bill Wendling <morbo@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201120224034.191382-2-morbo@google.com
arch/powerpc/boot/wrapper