Update I386_NEED_DYNAMIC_RELOC_TYPE_P to allow R_386_TLS_IE for relocation
in read-only section.
bfd/
	PR ld/28894
	* elfxx-x86.h (I386_NEED_DYNAMIC_RELOC_TYPE_P): Allow
	R_386_TLS_IE.
ld/
	PR ld/28894
	* testsuite/ld-i386/i386.exp: Run pr28894.
	* testsuite/ld-i386/pr28894.d: New file.
	* testsuite/ld-i386/pr28894.s: Likewise.
 #define I386_NEED_DYNAMIC_RELOC_TYPE_P(TYPE) \
   (I386_SIZE_TYPE_P (TYPE) \
    || I386_RELATIVE_RELOC_TYPE_P (TYPE) \
+   || (TYPE) == R_386_TLS_IE \
    || (TYPE) == R_386_TLS_LE \
    || (TYPE) == R_386_TLS_LE_32)
 #define X86_NEED_DYNAMIC_RELOC_TYPE_P(IS_X86_64, TYPE) \
 
 run_dump_test "dt-relr-1a"
 run_dump_test "dt-relr-1b"
 run_dump_test "pr28870"
+run_dump_test "pr28894"
 
 if { !([istarget "i?86-*-linux*"]
        || [istarget "i?86-*-gnu*"]
 
--- /dev/null
+#as: --32
+#ld: -shared -melf_i386 --warn-shared-textrel --fatal-warnings
+#error: .*warning: creating DT_TEXTREL in a shared object
 
--- /dev/null
+       .text
+       addl    foo@INDNTPOFF, %eax
+       .section .tbss,"awT",@nobits
+       .globl  foo
+       .hidden foo
+foo:
+       .byte 0