PR ld/21375: MIPS: Add test cases for undefined weaks resolving to zero
authorMaciej W. Rozycki <macro@mips.com>
Fri, 14 Sep 2018 19:22:57 +0000 (20:22 +0100)
committerMaciej W. Rozycki <macro@linux-mips.org>
Fri, 14 Sep 2018 19:22:57 +0000 (20:22 +0100)
commit982d0151e9ada98e2b5577f9af797b396e48f815
tree7343c32e9e82e1d5238023d54e6752bb70573e8d
parent47275900adcda29161e2853179c1fbde4da4c86a
PR ld/21375: MIPS: Add test cases for undefined weaks resolving to zero

Define a new procedure, `run_mips_undefweak_test', and use it to iterate
over several scenarios involving undefined weak symbols resolving to
zero, verifying expected regular MIPS, MIPS16 and microMIPS code, GOT
and dynamic symbol table generation, as well as the setting of the
EI_ABIVERSION field in the ELF file header.  In particular ensure that
symbol versioning works and that `__gnu_absolute_zero' gets assigned a
version (any will do) even if it has not been listed for exportation in
a linker version script.

ld/
PR ld/21375
* testsuite/ld-mips-elf/pr21375-abi.hd: New test.
* testsuite/ld-mips-elf/pr21375-noabi.hd: New test.
* testsuite/ld-mips-elf/pr21375.dd: New test.
* testsuite/ld-mips-elf/pr21375h.dd: New test.
* testsuite/ld-mips-elf/pr21375p.dd: New test.
* testsuite/ld-mips-elf/pr21375ph.dd: New test.
* testsuite/ld-mips-elf/pr21375s.dd: New test.
* testsuite/ld-mips-elf/pr21375s-n32.dd: New test.
* testsuite/ld-mips-elf/pr21375s-n64.dd: New test.
* testsuite/ld-mips-elf/pr21375sh.dd: New test.
* testsuite/ld-mips-elf/pr21375sh-n32.dd: New test.
* testsuite/ld-mips-elf/pr21375sh-n64.dd: New test.
* testsuite/ld-mips-elf/pr21375shg.dd: New test.
* testsuite/ld-mips-elf/pr21375sx.dd: New test.
* testsuite/ld-mips-elf/pr21375sxh.dd: New test.
* testsuite/ld-mips-elf/pr21375sm16.dd: New test.
* testsuite/ld-mips-elf/pr21375sm16h.dd: New test.
* testsuite/ld-mips-elf/pr21375su.dd: New test.
* testsuite/ld-mips-elf/pr21375su-n32.dd: New test.
* testsuite/ld-mips-elf/pr21375su-n64.dd: New test.
* testsuite/ld-mips-elf/pr21375suh.dd: New test.
* testsuite/ld-mips-elf/pr21375suh-n32.dd: New test.
* testsuite/ld-mips-elf/pr21375suh-n64.dd: New test.
* testsuite/ld-mips-elf/pr21375sux.dd: New test.
* testsuite/ld-mips-elf/pr21375suxh.dd: New test.
* testsuite/ld-mips-elf/pr21375.gd: New test.
* testsuite/ld-mips-elf/pr21375h.gd: New test.
* testsuite/ld-mips-elf/pr21375p.gd: New test.
* testsuite/ld-mips-elf/pr21375ph.gd: New test.
* testsuite/ld-mips-elf/pr21375s.gd: New test.
* testsuite/ld-mips-elf/pr21375s-n32.gd: New test.
* testsuite/ld-mips-elf/pr21375s-n64.gd: New test.
* testsuite/ld-mips-elf/pr21375sh.gd: New test.
* testsuite/ld-mips-elf/pr21375sh-n32.gd: New test.
* testsuite/ld-mips-elf/pr21375sh-n64.gd: New test.
* testsuite/ld-mips-elf/pr21375shg.gd: New test.
* testsuite/ld-mips-elf/pr21375shl.gd: New test.
* testsuite/ld-mips-elf/pr21375shv.gd: New test.
* testsuite/ld-mips-elf/pr21375sx.gd: New test.
* testsuite/ld-mips-elf/pr21375sxh.gd: New test.
* testsuite/ld-mips-elf/pr21375.sd: New test.
* testsuite/ld-mips-elf/pr21375-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375h.sd: New test.
* testsuite/ld-mips-elf/pr21375h-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375p.sd: New test.
* testsuite/ld-mips-elf/pr21375p-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375ph.sd: New test.
* testsuite/ld-mips-elf/pr21375ph-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375s.sd: New test.
* testsuite/ld-mips-elf/pr21375s-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375s-n32.sd: New test.
* testsuite/ld-mips-elf/pr21375s-n32-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375s-n64.sd: New test.
* testsuite/ld-mips-elf/pr21375s-n64-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375sh.sd: New test.
* testsuite/ld-mips-elf/pr21375sh-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375sh-n32.sd: New test.
* testsuite/ld-mips-elf/pr21375sh-n32-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375sh-n64.sd: New test.
* testsuite/ld-mips-elf/pr21375sh-n64-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375shg.sd: New test.
* testsuite/ld-mips-elf/pr21375shg-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375shl.sd: New test.
* testsuite/ld-mips-elf/pr21375shl-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375shv.sd: New test.
* testsuite/ld-mips-elf/pr21375shv-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375sx.sd: New test.
* testsuite/ld-mips-elf/pr21375sx-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375sxh.sd: New test.
* testsuite/ld-mips-elf/pr21375sxh-irix.sd: New test.
* testsuite/ld-mips-elf/pr21375.ld: New test linker script.
* testsuite/ld-mips-elf/pr21375-xgot.ld: New test linker script.
* testsuite/ld-mips-elf/pr21375.ver: New test version script.
* testsuite/ld-mips-elf/pr21375v.ver: New test version script.
* testsuite/ld-mips-elf/pr21375.s: New test source.
* testsuite/ld-mips-elf/pr21375-mips16.s: New test source.
* testsuite/ld-mips-elf/pr21375-n32.s: New test source.
* testsuite/ld-mips-elf/pr21375-n64.s: New test source.
* testsuite/ld-mips-elf/pr21375-xgot.s: New test source.
* testsuite/ld-mips-elf/mips-elf.exp (run_mips_undefweak_test):
New procedure; run the new tests.
81 files changed:
ld/ChangeLog
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/ld-mips-elf/pr21375-abi.hd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375-mips16.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375-n32.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375-n64.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375-noabi.hd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375-xgot.ld [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375-xgot.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375.ld [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375.ver [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375h-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375h.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375h.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375h.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375p-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375p.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375p.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375p.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375ph-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375ph.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375ph.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375ph.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-n32-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-n32.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-n32.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-n32.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-n64-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-n64.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-n64.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s-n64.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375s.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-n32-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-n32.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-n32.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-n32.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-n64-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-n64.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-n64.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh-n64.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sh.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shg-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shg.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shg.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shg.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shl-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shl.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shl.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shv-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shv.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375shv.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sm16.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sm16h.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375su-n32.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375su-n64.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375su.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375suh-n32.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375suh-n64.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375suh.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sux.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375suxh.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sx-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sx.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sx.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sx.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sxh-irix.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sxh.dd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sxh.gd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375sxh.sd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pr21375v.ver [new file with mode: 0644]