diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-09-20 15:25:55 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-11-04 12:04:11 +0000 |
commit | 88bd15396002102beedf49c87adee7b16c2bb409 (patch) | |
tree | 5093a3b0d4c2c2050dd6ed1faf7002977fe2e301 /ld/testsuite/ld-discard | |
parent | b709ef7ca12d963678c6f73b10a20bea60cfb0df (diff) | |
download | binutils-88bd15396002102beedf49c87adee7b16c2bb409.zip binutils-88bd15396002102beedf49c87adee7b16c2bb409.tar.gz binutils-88bd15396002102beedf49c87adee7b16c2bb409.tar.bz2 |
ld: Create test object files based on source file name
When creating object files during testing, base the name of the object
file on the name of the source file, rather than using dump0.o,
dump1.o, etc. There's a few places where we have multiple source
files with the same name but in different directories, in these cases,
even after this change, we still add a numerical suffix to make the
object file names unique. So if we have 'foo/src.s' and 'bar/src.s',
we will create object files 'src.o' and 'src1.o'.
Update the few tests that hard code the object file name into the
expected test results.
ld/ChangeLog:
* testsuite/lib/ld-lib.exp (run_dump_test): Use object file names
based on the original source file name.
* testsuite/ld-discard/extern.d: Update object file names.
* testsuite/ld-discard/start.d: Likewise.
* testsuite/ld-discard/static.d: Likewise.
* testsuite/ld-elf/orphan-8.map: Likewise.
Diffstat (limited to 'ld/testsuite/ld-discard')
-rw-r--r-- | ld/testsuite/ld-discard/extern.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-discard/start.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-discard/static.d | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/ld/testsuite/ld-discard/extern.d b/ld/testsuite/ld-discard/extern.d index 3075174..9932ebc 100644 --- a/ld/testsuite/ld-discard/extern.d +++ b/ld/testsuite/ld-discard/extern.d @@ -1,6 +1,6 @@ #source: extern.s #ld: -T discard.ld -#error: .*data.* referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o +#error: .*data.* referenced in section `\.text' of tmpdir/extern.o: defined in discarded section `\.data\.exit' of tmpdir/extern.o #objdump: -p #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-* #xfail: m68hc12-*-* m6812-*-* diff --git a/ld/testsuite/ld-discard/start.d b/ld/testsuite/ld-discard/start.d index 8c4a43b..d846bc7 100644 --- a/ld/testsuite/ld-discard/start.d +++ b/ld/testsuite/ld-discard/start.d @@ -1,7 +1,7 @@ #source: start.s #source: exit.s #ld: -T discard.ld -#error: `data' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump1.o +#error: `data' referenced in section `\.text' of tmpdir/start.o: defined in discarded section `\.data\.exit' of tmpdir/exit.o #objdump: -p #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-* #xfail: m68hc12-*-* m6812-*-* diff --git a/ld/testsuite/ld-discard/static.d b/ld/testsuite/ld-discard/static.d index 28ab9e8..3f61bb3 100644 --- a/ld/testsuite/ld-discard/static.d +++ b/ld/testsuite/ld-discard/static.d @@ -1,6 +1,6 @@ #source: static.s #ld: -T discard.ld -#error: `(\.data\.exit|data)' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o +#error: `(\.data\.exit|data)' referenced in section `\.text' of tmpdir/static.o: defined in discarded section `\.data\.exit' of tmpdir/static.o #objdump: -p #xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-* #xfail: m68hc12-*-* m6812-*-* |