From: H.J. Lu Date: Fri, 4 Aug 2017 12:39:56 +0000 (-0700) Subject: Add a testcase for "ld -d" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f06dab1e3acfb675669348a3ff331580d4eaf1e;p=binutils-gdb.git 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 99c14554387..2cf0d4994b9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2017-08-04 H.J. Lu + + PR ld/21904 + * testsuite/ld-elf/pr21904.d: New file. + * testsuite/ld-elf/pr21904.s: Likewise. + 2017-08-03 Nick Clifton PR ld/21884 diff --git a/ld/testsuite/ld-elf/pr21904.d b/ld/testsuite/ld-elf/pr21904.d new file mode 100644 index 00000000000..1d464fc7c4b --- /dev/null +++ b/ld/testsuite/ld-elf/pr21904.d @@ -0,0 +1,6 @@ +#ld: -d -r +#readelf: -s + +#... +.*: [0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ foo +#pass diff --git a/ld/testsuite/ld-elf/pr21904.s b/ld/testsuite/ld-elf/pr21904.s new file mode 100644 index 00000000000..587a226fcf2 --- /dev/null +++ b/ld/testsuite/ld-elf/pr21904.s @@ -0,0 +1,5 @@ + .ifdef HPUX +foo .comm 4 + .else + .comm foo, 4, 4 + .endif