From da614360f520b84a9c87506eb0c880f7a056468b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 13 Jun 2017 12:03:40 -0700 Subject: [PATCH] ld: Add tests for .startof.SECNAME/.sizeof.SECNAME * testsuite/ld-elf/sizeof.d: Renamed to ... * testsuite/ld-elf/sizeofa.d: This. Updated. * testsuite/ld-elf/startof.d: Renamed to ... * testsuite/ld-elf/startofa.d: This. Updated. * testsuite/ld-elf/sizeofb.d: New file. * testsuite/ld-elf/startofb.d: Likewise. --- ld/ChangeLog | 9 +++++++++ ld/testsuite/ld-elf/{sizeof.d => sizeofa.d} | 1 + ld/testsuite/ld-elf/sizeofb.d | 13 +++++++++++++ ld/testsuite/ld-elf/{startof.d => startofa.d} | 1 + ld/testsuite/ld-elf/startofb.d | 13 +++++++++++++ 5 files changed, 37 insertions(+) rename ld/testsuite/ld-elf/{sizeof.d => sizeofa.d} (94%) create mode 100644 ld/testsuite/ld-elf/sizeofb.d rename ld/testsuite/ld-elf/{startof.d => startofa.d} (94%) create mode 100644 ld/testsuite/ld-elf/startofb.d diff --git a/ld/ChangeLog b/ld/ChangeLog index dcfc6022630..59c99ae1ff1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2017-06-13 H.J. Lu + + * testsuite/ld-elf/sizeof.d: Renamed to ... + * testsuite/ld-elf/sizeofa.d: This. Updated. + * testsuite/ld-elf/startof.d: Renamed to ... + * testsuite/ld-elf/startofa.d: This. Updated. + * testsuite/ld-elf/sizeofb.d: New file. + * testsuite/ld-elf/startofb.d: Likewise. + 2017-06-13 H.J. Lu PR ld/20022 diff --git a/ld/testsuite/ld-elf/sizeof.d b/ld/testsuite/ld-elf/sizeofa.d similarity index 94% rename from ld/testsuite/ld-elf/sizeof.d rename to ld/testsuite/ld-elf/sizeofa.d index 7cad75a5e58..0aac60770ff 100644 --- a/ld/testsuite/ld-elf/sizeof.d +++ b/ld/testsuite/ld-elf/sizeofa.d @@ -1,3 +1,4 @@ +#source: sizeof.s #ld: -Ur #readelf: -sW diff --git a/ld/testsuite/ld-elf/sizeofb.d b/ld/testsuite/ld-elf/sizeofb.d new file mode 100644 index 00000000000..331c3864920 --- /dev/null +++ b/ld/testsuite/ld-elf/sizeofb.d @@ -0,0 +1,13 @@ +#source: sizeof.s +#ld: -shared +#readelf: -sW +#target: *-*-linux* *-*-gnu* + +Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND + +#... + +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo +#... + +[0-9]+: 0+10 + +0 +NOTYPE +GLOBAL +DEFAULT +ABS +.sizeof.scnfoo +#pass diff --git a/ld/testsuite/ld-elf/startof.d b/ld/testsuite/ld-elf/startofa.d similarity index 94% rename from ld/testsuite/ld-elf/startof.d rename to ld/testsuite/ld-elf/startofa.d index cf1f0643ea5..00ab27e7ee6 100644 --- a/ld/testsuite/ld-elf/startof.d +++ b/ld/testsuite/ld-elf/startofa.d @@ -1,3 +1,4 @@ +#source: startof.s #ld: -Ur #readelf: -sW diff --git a/ld/testsuite/ld-elf/startofb.d b/ld/testsuite/ld-elf/startofb.d new file mode 100644 index 00000000000..e03bd23c068 --- /dev/null +++ b/ld/testsuite/ld-elf/startofb.d @@ -0,0 +1,13 @@ +#source: startof.s +#ld: -shared +#readelf: -sW +#target: *-*-linux* *-*-gnu* + +Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND + +#... + +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +.startof.scnfoo +#... + +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo +#pass -- 2.30.2