This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 12001, --defsym


On Thu, Jan 13, 2011 at 5:55 AM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Jan 13, 2011 at 05:37:25AM -0800, H.J. Lu wrote:
>> You should add some testcases for this new feature.
>
> Blah. ?How about *you* fix some of your recently added testcases,
> which you added without approval, again.
>
> alpha-dec-vms ?+FAIL: ld-misc/defsym1

Executing on host: sh -c {./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-misc  -e 0 --defsym
foo=1 tmpdir/start.o tmpdir/libfoo.a -o tmpdir/dump tmpdir/dump0.o
2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]^M
./ld-new: cannot find -limagelib
./ld-new: cannot find -lstarlet
./ld-new: cannot find -lsys$public_vectors
failed with: <./ld-new: cannot find -limagelib
./ld-new: cannot find -lstarlet
./ld-new: cannot find -lsys$public_vectors>, expected: <>
./ld-new: cannot find -limagelib
./ld-new: cannot find -lstarlet
./ld-new: cannot find -lsys$public_vectors
failed with: <./ld-new: cannot find -limagelib
./ld-new: cannot find -lstarlet
./ld-new: cannot find -lsys$public_vectors>, expected: <>
FAIL: ld-misc/defsym1

There are many similar failures.

> frv-linux ?+FAIL: ld-misc/defsym1

Executing on host: sh -c {./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-misc  -e 0 --defsym
foo=1 tmpdir/start.o tmpdir/libfoo.a -o tmpdir/dump tmpdir/dump0.o
2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]^M
tmpdir/start.o: In function `main':
(.text+0x0): warning: cannot emit fixups in read-only section
./ld-new: final link failed: Nonrepresentable section on output
failed with: <tmpdir/start.o: In function `main':
(.text+0x0): warning: cannot emit fixups in read-only section
./ld-new: final link failed: Nonrepresentable section on output>, expected: <>
tmpdir/start.o: In function `main':
(.text+0x0): warning: cannot emit fixups in read-only section
./ld-new: final link failed: Nonrepresentable section on output
failed with: <tmpdir/start.o: In function `main':
(.text+0x0): warning: cannot emit fixups in read-only section
./ld-new: final link failed: Nonrepresentable section on output>, expected: <>
FAIL: ld-misc/defsym1

Not supported or linker bug?

> microblaze-elf ?+FAIL: ld-misc/defsym1

Executing on host: sh -c {./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-misc  -e 0 --defsym
foo=1 tmpdir/start.o tmpdir/libfoo.a -o tmpdir/dump tmpdir/dump0.o
2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]^M
./ld-new: tmpdir/dump: Not enough room for program headers, try linking with -N
./ld-new: final link failed: Bad value
failed with: <./ld-new: tmpdir/dump: Not enough room for program
headers, try linking with -N
./ld-new: final link failed: Bad value>, expected: <>
./ld-new: tmpdir/dump: Not enough room for program headers, try linking with -N
./ld-new: final link failed: Bad value
failed with: <./ld-new: tmpdir/dump: Not enough room for program
headers, try linking with -N
./ld-new: final link failed: Bad value>, expected: <>
FAIL: ld-misc/defsym1

There are many similar failures.

> tic30-unknown-aout ?+FAIL: ld-misc/defsym1

Executing on host: sh -c {./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-misc  -e 0 --defsym
foo=1 tmpdir/start.o tmpdir/libfoo.a -o tmpdir/dump tmpdir/dump0.o
2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]^M
sh: line 1: 17982 Segmentation fault      ./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-misc -e 0 --defsym
foo=1 tmpdir/start.o tmpdir/libfoo.a -o tmpdir/dump tmpdir/dump0.o
2>&1
failed with: <sh: line 1: 17982 Segmentation fault      ./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-misc -e 0 --defsym
foo=1 tmpdir/start.o tmpdir/libfoo.a -o tmpdir/dump tmpdir/dump0.o
2>&1>, expected: <>
sh: line 1: 17982 Segmentation fault      ./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-misc -e 0 --defsym
foo=1 tmpdir/start.o tmpdir/libfoo.a -o tmpdir/dump tmpdir/dump0.o
2>&1
failed with: <sh: line 1: 17982 Segmentation fault      ./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-misc -e 0 --defsym
foo=1 tmpdir/start.o tmpdir/libfoo.a -o tmpdir/dump tmpdir/dump0.o
2>&1>, expected: <>
FAIL: ld-misc/defsym1

Looks like linker bugs to me.

> pdp11-dec-aout ?+ERROR: /src/binutils-current/ld/testsuite/ld-misc/start.s: assembly failed

/export/gnu/import/git/binutils/ld/testsuite/ld-misc/start.s:
Assembler messages:
/export/gnu/import/git/binutils/ld/testsuite/ld-misc/start.s:10: Fatal
error: Case value 2 unexpected at line 267 of file
"/export/gnu/import/git/binutils/gas/config/tc-pdp11.c"

/export/gnu/import/git/binutils/ld/testsuite/ld-misc/start.s:
Assembler messages:
/export/gnu/import/git/binutils/ld/testsuite/ld-misc/start.s:10: Fatal
error: Case value 2 unexpected at line 267 of file
"/export/gnu/import/git/binutils/gas/config/tc-pdp11.c"

ERROR: /export/gnu/import/git/binutils/ld/testsuite/ld-misc/start.s:
assembly failed

Unsupported?

> alpha-dec-vms ?+FAIL: ld-scripts/defined4

Same as ld-misc/defsym1.

> mips64-linux ?+FAIL: ld-scripts/defined4
> mipsel-linux-gnu ?+FAIL: ld-scripts/defined4
> mipsisa32el-linux ?+FAIL: ld-scripts/defined4
> mips-linux ?+FAIL: ld-scripts/defined4

We check that defined and defined1 have the same address.  MIPS targets
use different address. I will skip it on MIPS.

> mmix ?+FAIL: ld-scripts/defined4

I got

[hjl@gnu-6 ld]$ ../binutils/objdump -t -h tmpdir/dump

tmpdir/dump:     file format mmo

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .text         00000000  0000000000000000  0000000000000000  00000000  2**2

  1 .data         00000002  0000000000000000  0000000000000000  00000000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
SYMBOL TABLE:
0000000000000000 g       .text Main
0000000000000000 g       .text defined1
0000000000000000 g       .text defined

Don't know why symbols are in .text section. I will skip it also.

> rs6000-aix4.3.3 ?+FAIL: ld-scripts/defined4
> rs6000-aix5.1 ?+FAIL: ld-scripts/defined4

Should XFAIL on rs6000-*-aix*.

> sh-pe ?+FAIL: ld-scripts/defined4

Executing on host: sh -c {./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-scripts
-Tdefined2.t -o tmpdir/dump tmpdir/dump0.o  2>&1}  /dev/null ld.tmp
(timeout = 300)
spawn [open ...]^M
DJ: zero vma section reloc detected: `.text' #0 f=283
succeeded with: <DJ: zero vma section reloc detected: `.text' #0
f=283>, expected: <>
DJ: zero vma section reloc detected: `.text' #0 f=283
succeeded with: <DJ: zero vma section reloc detected: `.text' #0
f=283>, expected: <>
FAIL: ld-scripts/defined2

There are many similar failures.

> tic30-unknown-aout ?+FAIL: ld-scripts/defined4
>
> alpha-dec-vms ?+FAIL: ld-scripts/assert2

Same as ld-misc/defsym1.

> alpha-dec-vms ?+FAIL: ld-scripts/expr2

Same as ld-misc/defsym1.

> arm-aout ?+FAIL: ld-scripts/expr2

[hjl@gnu-6 ld]$
/export/build/gnu/binutils-cross/build-arm-aout/ld/../gas/as-new    -o
tmpdir/dump0.o /export/gnu/import/git/binutils/ld/testsuite/ld-scripts/expr2.s
[hjl@gnu-6 ld]$ ./ld-new
-L/export/gnu/import/git/binutils/ld/testsuite/ld-scripts  -T expr2.t
-o tmpdir/dump tmpdir/dump0.o
[hjl@gnu-6 ld]$
/export/build/gnu/binutils-cross/build-arm-aout/ld/../binutils/nm-new
-B tmpdir/dump > tmpdir/dump.out
[hjl@gnu-6 ld]$ cat tmpdir/dump.out
00000000 a
0000c000 D
0000c000 A _end
0000c000 D _text
[hjl@gnu-6 ld]$

I will xfail it also.

> rs6000-aix4.3.3 ?+FAIL: ld-scripts/expr2
> rs6000-aix5.1 ?+FAIL: ld-scripts/expr2

Same as ld-scripts/defined4.

> tic30-unknown-aout ?+FAIL: ld-scripts/expr2

Same as ld-misc/defsym1.

I am checking in this patch,

-- 
H.J.
---
diff --git a/ld/testsuite/ld-scripts/defined4.d
b/ld/testsuite/ld-scripts/defined4.d
index 2c3a6ea..b434e40 100644
--- a/ld/testsuite/ld-scripts/defined4.d
+++ b/ld/testsuite/ld-scripts/defined4.d
@@ -1,6 +1,10 @@
 #ld: -Tdefined4.t
 #nm: -B
 #source: defined4.s
+#xfail: rs6000-*-aix*
+#notarget: mips*-*-* mmix-*-*
+# We check that defined and defined1 have the same address.  MIPS targets
+# use different address. MMIX puts defined and defined1 in text section.

 # Check that arithmetic on DEFINED works.
 #...
diff --git a/ld/testsuite/ld-scripts/expr2.d b/ld/testsuite/ld-scripts/expr2.d
index 6f7e253..26354f6 100644
--- a/ld/testsuite/ld-scripts/expr2.d
+++ b/ld/testsuite/ld-scripts/expr2.d
@@ -1,5 +1,6 @@
 # ld: -T expr2.t
 #nm: -B
+#xfail: rs6000-*-aix* arm-*-*aout

 #...
 .* D defined


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]