DT_TEXTREL set by -Wl,-z,notext is incompatible with indirect functions (IFUNC).

NVFlex.o in cuda_9_0/lib64/libculibos.a has buggy .eh_frame, which overlaps with .rela.rodata R_X86_64_PC32 relocations and makes it not able to be linked with LLD.

PiperOrigin-RevId: 196155873
This commit is contained in:
A. Unique TensorFlower 2018-05-10 12:37:29 -07:00 committed by TensorFlower Gardener
parent 0172ce3504
commit f1d31a2d5e

View File

@ -959,15 +959,6 @@ def tf_cuda_library(deps=None, cuda_deps=None, copts=tf_copts(), **kwargs):
if not cuda_deps:
cuda_deps = []
if 'linkstatic' not in kwargs or kwargs['linkstatic'] != 1:
enable_text_relocation_linkopt = select({
clean_dep("//tensorflow:darwin"): [],
clean_dep("//tensorflow:windows"): [],
"//conditions:default": ['-Wl,-z,notext'],})
if 'linkopts' in kwargs:
kwargs['linkopts'] += enable_text_relocation_linkopt
else:
kwargs['linkopts'] = enable_text_relocation_linkopt
native.cc_library(
deps=deps + if_cuda(cuda_deps + [
clean_dep("//tensorflow/core:cuda"),