bfd/
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Apr 2007 16:16:28 +0000 (16:16 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Apr 2007 16:16:28 +0000 (16:16 +0000)
2007-04-05  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/4304
* elflink.c (bfd_elf_final_link): Call einfo callback in
bfd_link_info instead of _bfd_error_handler for DT_TEXTREL
warning.

ld/testsuite/

2007-04-05  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/4304
* ld-i386/i386.exp: Run "warn1".

* ld-i386/warn1.d: New file.
* ld-i386/warn1.s: Likewise.

bfd/ChangeLog
bfd/elflink.c
ld/testsuite/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/warn1.d [new file with mode: 0644]
ld/testsuite/ld-i386/warn1.s [new file with mode: 0644]

index ab00026624aad712a49017162933df650a7b18f1..813c13dcaae727d68bfe22345a529e9172d675e0 100644 (file)
@@ -1,3 +1,10 @@
+2007-04-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/4304
+       * elflink.c (bfd_elf_final_link): Call einfo callback in
+       bfd_link_info instead of _bfd_error_handler for DT_TEXTREL
+       warning.
+
 2007-04-05  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-spu.c (spu_elf_output_symbol_hook): New function.
index 360ac69cdcb1e9666df0dbafaf039dc8936bfbcf..228debb3a6e57e120ff9c350cf60c9ce3de2b127 100644 (file)
@@ -9944,8 +9944,8 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
 
              if (dyn.d_tag == DT_TEXTREL)
                {
-                 _bfd_error_handler
-                   (_("warning: creating a DT_TEXTREL in a shared object."));
+                info->callbacks->einfo 
+                   (_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
                  break;
                }
            }
index d15e7974e2758c20221cd9e7b42f121d0bfbff1b..bea757ea21c02e05783e7afbfa654b9268cf266d 100644 (file)
@@ -1,3 +1,11 @@
+2007-04-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/4304
+       * ld-i386/i386.exp: Run "warn1".
+
+       * ld-i386/warn1.d: New file.
+       * ld-i386/warn1.s: Likewise.
+
 2007-04-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        * ld-i386/combreloc.d: Remove #target: i?86-*-*.
index f00882938261deea3849462093478704c9dc4cda..1032e8ec3c504ac2f7be4c3b702999ea2ddb0969 100644 (file)
@@ -115,3 +115,4 @@ run_dump_test "pcrel8"
 run_dump_test "pcrel16"
 run_dump_test "pcrel16abs"
 run_dump_test "alloc"
+run_dump_test "warn1"
diff --git a/ld/testsuite/ld-i386/warn1.d b/ld/testsuite/ld-i386/warn1.d
new file mode 100644 (file)
index 0000000..dd541f2
--- /dev/null
@@ -0,0 +1,4 @@
+#name: --warn-shared-textrel --fatal-warnings
+#as: --32
+#ld: -shared -melf_i386 --warn-shared-textrel --fatal-warnings
+#error: .*warning: creating a DT_TEXTREL in a shared object.
diff --git a/ld/testsuite/ld-i386/warn1.s b/ld/testsuite/ld-i386/warn1.s
new file mode 100644 (file)
index 0000000..ca3481a
--- /dev/null
@@ -0,0 +1,5 @@
+       .text
+       .globl foo
+       .type   foo, @function
+foo:
+       movl    bar, %eax
This page took 0.035622 seconds and 4 git commands to generate.