From: H.J. Lu Date: Tue, 13 Jun 2017 19:03:40 +0000 (-0700) Subject: ld: Add tests for .startof.SECNAME/.sizeof.SECNAME X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=da614360f520b84a9c87506eb0c880f7a056468b;p=deliverable%2Fbinutils-gdb.git 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index dcfc602263..59c99ae1ff 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/sizeof.d deleted file mode 100644 index 7cad75a5e5..0000000000 --- a/ld/testsuite/ld-elf/sizeof.d +++ /dev/null @@ -1,11 +0,0 @@ -#ld: -Ur -#readelf: -sW - -Symbol table '\.symtab' 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]+ +__stop_scnfoo -#... - +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +.sizeof.scnfoo -#pass diff --git a/ld/testsuite/ld-elf/sizeofa.d b/ld/testsuite/ld-elf/sizeofa.d new file mode 100644 index 0000000000..0aac60770f --- /dev/null +++ b/ld/testsuite/ld-elf/sizeofa.d @@ -0,0 +1,12 @@ +#source: sizeof.s +#ld: -Ur +#readelf: -sW + +Symbol table '\.symtab' 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]+ +__stop_scnfoo +#... + +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +.sizeof.scnfoo +#pass diff --git a/ld/testsuite/ld-elf/sizeofb.d b/ld/testsuite/ld-elf/sizeofb.d new file mode 100644 index 0000000000..331c386492 --- /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/startof.d deleted file mode 100644 index cf1f0643ea..0000000000 --- a/ld/testsuite/ld-elf/startof.d +++ /dev/null @@ -1,11 +0,0 @@ -#ld: -Ur -#readelf: -sW - -Symbol table '\.symtab' 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 +UND +.startof.scnfoo -#... - +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +__start_scnfoo -#pass diff --git a/ld/testsuite/ld-elf/startofa.d b/ld/testsuite/ld-elf/startofa.d new file mode 100644 index 0000000000..00ab27e7ee --- /dev/null +++ b/ld/testsuite/ld-elf/startofa.d @@ -0,0 +1,12 @@ +#source: startof.s +#ld: -Ur +#readelf: -sW + +Symbol table '\.symtab' 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 +UND +.startof.scnfoo +#... + +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +__start_scnfoo +#pass diff --git a/ld/testsuite/ld-elf/startofb.d b/ld/testsuite/ld-elf/startofb.d new file mode 100644 index 0000000000..e03bd23c06 --- /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