ld: Add tests for .startof.SECNAME/.sizeof.SECNAME
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 13 Jun 2017 19:03:40 +0000 (12:03 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 13 Jun 2017 19:03:40 +0000 (12:03 -0700)
* 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
ld/testsuite/ld-elf/sizeof.d [deleted file]
ld/testsuite/ld-elf/sizeofa.d [new file with mode: 0644]
ld/testsuite/ld-elf/sizeofb.d [new file with mode: 0644]
ld/testsuite/ld-elf/startof.d [deleted file]
ld/testsuite/ld-elf/startofa.d [new file with mode: 0644]
ld/testsuite/ld-elf/startofb.d [new file with mode: 0644]

index dcfc602263096847572ae2794fe3c12a85533632..59c99ae1ff1732049829d2e80eb8e93ac584651a 100644 (file)
@@ -1,3 +1,12 @@
+2017-06-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * 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  <hongjiu.lu@intel.com>
 
        PR ld/20022
diff --git a/ld/testsuite/ld-elf/sizeof.d b/ld/testsuite/ld-elf/sizeof.d
deleted file mode 100644 (file)
index 7cad75a..0000000
+++ /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 (file)
index 0000000..0aac607
--- /dev/null
@@ -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 (file)
index 0000000..331c386
--- /dev/null
@@ -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 (file)
index cf1f064..0000000
+++ /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 (file)
index 0000000..00ab27e
--- /dev/null
@@ -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 (file)
index 0000000..e03bd23
--- /dev/null
@@ -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