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: pr13839 fix


On Tue, Mar 13, 2012 at 10:23 PM, Alan Modra <amodra@gmail.com> wrote:
> This fixes the PR by silencing an error when in mark phase. ?It also
> fixes a couple of other problems I noticed when looking at this code.
>
> ? ? ? ?PR ld/13839
> ? ? ? ?* ldexp.c (fold_name): Ignore undefined symbols when assigning to
> ? ? ? ?dot in mark phase.
> ? ? ? ?(exp_fold_tree_1): Evaluate assignment to dot expressions even when
> ? ? ? ?discarding result, for side effects. ?Fix typo in error message.
>

I checked in this testcase.

Thanks.


-- 
H.J.
---
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 1e3c5c1..a17d081 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2012-03-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/13839
+	* ld-elf/pr13839.d: New.
+	* ld-elf/pr13839.s: Likewise.
+	* ld-elf/pr13839.t: Likewise.
+
 2012-03-09  H.J. Lu  <hongjiu.lu@intel.com>

 	PR ld/13817
diff --git a/ld/testsuite/ld-elf/pr13839.d b/ld/testsuite/ld-elf/pr13839.d
new file mode 100644
index 0000000..fc63a90
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr13839.d
@@ -0,0 +1,6 @@
+#ld: -T pr13839.t
+#nm: -n
+
+#...
+[0-9a-f]+ T _text
+#pass
diff --git a/ld/testsuite/ld-elf/pr13839.s b/ld/testsuite/ld-elf/pr13839.s
new file mode 100644
index 0000000..3d132f6
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr13839.s
@@ -0,0 +1,10 @@
+	.text
+	.globl main
+	.globl start
+	.globl _start
+	.globl __start
+main:
+start:
+_start:
+__start:
+	.byte 0
diff --git a/ld/testsuite/ld-elf/pr13839.t b/ld/testsuite/ld-elf/pr13839.t
new file mode 100644
index 0000000..6baa228
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr13839.t
@@ -0,0 +1,9 @@
+SECTIONS {
+	.text : {
+		_text = .;
+		*(.text)
+	}
+	_end = .;
+	/DISCARD/ : { *(.*) }
+}
+. = ASSERT((_end - _text <= (512 * 1024 * 1024)), "foo");


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