bfd/
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 25 Apr 2005 14:59:09 +0000 (14:59 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 25 Apr 2005 14:59:09 +0000 (14:59 +0000)
2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>

PR 858
* elflink.c (elf_link_input_bfd): Make non-debugging reference
to discarded section an error.

ld/testsuite/

2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>

* ld-discard/extern.d: Expect error.
* ld-discard/start.d: Likewise.
* ld-discard/static.d: Likewise.

bfd/ChangeLog
bfd/elflink.c
ld/testsuite/ChangeLog
ld/testsuite/ld-discard/extern.d
ld/testsuite/ld-discard/start.d
ld/testsuite/ld-discard/static.d

index 5e9f707685d6ea7c843c29facfd3ef2bddfb59d9..9d8e077f425e75f5932ad8518ea095689181b3a9 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR 858
+       * elflink.c (elf_link_input_bfd): Make non-debugging reference
+       to discarded section an error.
+
 2005-04-21  Jerome Guitton  <guitton@gnat.com>
 
        * configure.in: Replace BFD_NEED_DECLARATION checks by the
index 017ebe436a9ce80dd2702709a8bcaeae998c6efa..cd9131ef3805d301d0afc7c0e954fe502e26e3eb 100644 (file)
@@ -7048,6 +7048,8 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
                            (_("`%s' referenced in section `%A' of %B: "
                               "defined in discarded section `%A' of %B"),
                             o, input_bfd, sec, sec->owner, sym_name);
+                         bfd_set_error (bfd_error_bad_value);
+                         return FALSE;
                        }
 
                      /* Try to do the best we can to support buggy old
index f1fbcb922f09a6d29c01ac5520f47c5f40fdf373..355d97fc20ee9adcd2f3d5a7430f5113885e1685 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * ld-discard/extern.d: Expect error.
+       * ld-discard/start.d: Likewise.
+       * ld-discard/static.d: Likewise.
+
 2005-04-19  Alan Modra  <amodra@bigpond.net.au>
 
        * ld-powerpc/reloc.d: Update to suit removal of non-alloc relocs.
index e5143cb94c711f3e35a086442b62ec6d85275c56..903379209bdc91556511ef0786eae201644a2ae4 100644 (file)
@@ -1,6 +1,6 @@
 #source: extern.s
 #ld: -T discard.ld
-#warning: .*data.* referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o
+#error: .*data.* referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o
 #objdump: -p
 #pass
 # The expected warning used to start with "`data' referenced..." but
index 2ad6e9f00c6878d462c4f7fbfb64fce3eb45cd4c..5c685e810410fc54ee69103d35254c6b35b3af22 100644 (file)
@@ -1,6 +1,6 @@
 #source: start.s
 #source: exit.s
 #ld: -T discard.ld
-#warning: `data' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump1.o
+#error: `data' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump1.o
 #objdump: -p
 #pass
index eefeeea65dec3baab49ae885b6ed4603435928ee..3b5255bce3a29a00b388123542b8620a63b5ad43 100644 (file)
@@ -1,5 +1,5 @@
 #source: static.s
 #ld: -T discard.ld
-#warning: `(\.data\.exit|data)' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o
+#error: `(\.data\.exit|data)' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o
 #objdump: -p
 #pass