diff options
Diffstat (limited to 'ld/testsuite/ld-scripts')
-rw-r--r-- | ld/testsuite/ld-scripts/ld-version-2.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/ld-version.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/ld-version.t | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/script.exp | 2 |
4 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/ld-version-2.d b/ld/testsuite/ld-scripts/ld-version-2.d new file mode 100644 index 00000000000..761234901ff --- /dev/null +++ b/ld/testsuite/ld-scripts/ld-version-2.d @@ -0,0 +1,8 @@ +# source: data.s +# ld: --enable-linker-version -e 0 +# readelf: -p.comment +# target: [is_elf_format] +# skip: ft32-*-* pru-*-* + +String dump of section '.comment': +.*GNU ld \(GNU Binutils\) 2.* diff --git a/ld/testsuite/ld-scripts/ld-version.d b/ld/testsuite/ld-scripts/ld-version.d new file mode 100644 index 00000000000..a55fc5e003b --- /dev/null +++ b/ld/testsuite/ld-scripts/ld-version.d @@ -0,0 +1,7 @@ +# source: data.s +# ld: --enable-linker-version -T ld-version.t +# readelf: -p.comment +# target: [is_elf_format] + +String dump of section '.comment': +.*GNU ld \(GNU Binutils\) 2.* diff --git a/ld/testsuite/ld-scripts/ld-version.t b/ld/testsuite/ld-scripts/ld-version.t new file mode 100644 index 00000000000..5e7d22c7bae --- /dev/null +++ b/ld/testsuite/ld-scripts/ld-version.t @@ -0,0 +1,9 @@ +SECTIONS +{ + .comment : + { + *(.comment); + LINKER_VERSION; + } + /DISCARD/ : { *(*) } +} diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp index a574dde034c..28cc6daf51d 100644 --- a/ld/testsuite/ld-scripts/script.exp +++ b/ld/testsuite/ld-scripts/script.exp @@ -231,6 +231,8 @@ run_dump_test "asciz" run_dump_test "align-with-input" run_dump_test "pr20302" run_dump_test "output-section-types" +run_dump_test "ld-version" +run_dump_test "ld-version-2" run_dump_test "segment-start" {{name (default)}} run_dump_test "segment-start" {{name (overridden)} \ |