* testsuite/ld-elf/elf.exp: Set ASFLAGS for tic6x.
	* testsuite/ld-elf/reloc-discard.d: Remove tic6x xfail.
+2020-12-01  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-elf/elf.exp: Set ASFLAGS for tic6x.
+       * testsuite/ld-elf/reloc-discard.d: Remove tic6x xfail.
+
 2020-12-01  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-elf/pr26979a.s,
 
     set ASFLAGS "$ASFLAGS --defsym NO_SET=1"
 }
 
+if [istarget "tic6x-*-*"] {
+    append ASFLAGS " -mpic -mpid=near"
+}
+
 if { [istarget "*-*-solaris*"] } {
     # Same for Solaris
     set options_regsub(ld) {-melf_x86_64 -melf_x86_64_sol2}
 
 #target: [check_shared_lib_support]
 #skip: powerpc64*-*-*
 #source: reloc-discard.s
-#xfail: tic6x-*-*
-# Need to figure out how to pass `-fpic' for NDS32 or `-mpic -mpid=near'
-# for TI C6X targets to GAS for this test.
 # PowerPC64 warns when discarding dynamic relocs, which is generally
 # a good thing.  See reloc-discard-warn.d test variant.