Add a testcase for "ld -d"

"ld -d" assigns space to common symbols even if a relocatable output
file is specified (with '-r').

	PR ld/21904
	* testsuite/ld-elf/pr21904.d: New file.
	* testsuite/ld-elf/pr21904.s: Likewise.
This commit is contained in:
H.J. Lu 2017-08-04 05:39:56 -07:00
parent 223b97ba9d
commit 9f06dab1e3
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-08-04 H.J. Lu <hongjiu.lu@intel.com>
PR ld/21904
* testsuite/ld-elf/pr21904.d: New file.
* testsuite/ld-elf/pr21904.s: Likewise.
2017-08-03 Nick Clifton <nickc@redhat.com>
PR ld/21884

View File

@ -0,0 +1,6 @@
#ld: -d -r
#readelf: -s
#...
.*: [0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ foo
#pass

View File

@ -0,0 +1,5 @@
.ifdef HPUX
foo .comm 4
.else
.comm foo, 4, 4
.endif