[ELF][test] Rewrite st_value=0 copy relocation tests
authorFangrui Song <i@maskray.me>
Sun, 13 Dec 2020 00:50:25 +0000 (16:50 -0800)
committerFangrui Song <i@maskray.me>
Sun, 13 Dec 2020 00:50:25 +0000 (16:50 -0800)
commit5d1c723b73aff4a33c4653b9f675cf18dea8c7d6
tree6d58a956bdfe246ac74ee3a8f1015594c3863ac4
parenteaa09823348a7ba20417c109f4d7b26258c6abe6
[ELF][test] Rewrite st_value=0 copy relocation tests

The original tests have unneeded symbols and copy-relocation-zero-abs-addr.s
does not actually test anything.

Rewrite them and add copy-relocation-zero-addr.s instead.

Add --soname=b so that the address 0x203400 will be stable.  (When linking an
executable with %t.so, the path %t.so will be recorded in the DT_NEEDED entry if
%t.so doesn't have DT_SONAME. .dynstr will have varying lengths on different
systems.)
lld/test/ELF/Inputs/copy-relocation-zero-abs-addr.s [deleted file]
lld/test/ELF/Inputs/copy-relocation-zero-nonabs-addr.s [deleted file]
lld/test/ELF/Inputs/copy-relocation-zero-nonabs-addr.script [deleted file]
lld/test/ELF/copy-relocation-zero-abs-addr.s [deleted file]
lld/test/ELF/copy-relocation-zero-addr.s [new file with mode: 0644]
lld/test/ELF/copy-relocation-zero-nonabs-addr.s [deleted file]