This is the mail archive of the binutils-cvs@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]

[binutils-gdb] Add test to ensure that ternary linker script operators copy symbol flags.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=15a70cda9772c5775f471182fea70b3fd28b76f0

commit 15a70cda9772c5775f471182fea70b3fd28b76f0
Author: Simon Dardis <Simon.Dardis@imgtec.com>
Date:   Mon Oct 19 14:32:54 2015 +0100

    Add test to ensure that ternary linker script operators copy symbol flags.
    
    	* ld-elf/attributes.d: New test for symbol attribute copying.
    	* ld-elf/attributes.ld: Part of above.
    	* ld-elf/attributes.s: Likewise.

Diff:
---
 ld/testsuite/ChangeLog            |  6 ++++++
 ld/testsuite/ld-elf/attributes.d  | 10 ++++++++++
 ld/testsuite/ld-elf/attributes.ld |  9 +++++++++
 ld/testsuite/ld-elf/attributes.s  |  5 +++++
 4 files changed, 30 insertions(+)

diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 83d28f0..4dfbcda 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-19  Simon Dardis  <Simon.Dardis@imgtec.com>
+
+	* ld-elf/attributes.d: New test for symbol attribute copying.
+	* ld-elf/attributes.ld: Part of above.
+	* ld-elf/attributes.s: Likewise.
+
 2015-10-16  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* ld-i386/lea1.s: Add a test for loading address of local common
diff --git a/ld/testsuite/ld-elf/attributes.d b/ld/testsuite/ld-elf/attributes.d
new file mode 100644
index 0000000..79afd14
--- /dev/null
+++ b/ld/testsuite/ld-elf/attributes.d
@@ -0,0 +1,10 @@
+#name: Symbol flags copy
+#ld: -T attributes.ld
+#objdump: -t
+#notarget: pj-*-* dlx-*-* d30v-*-*
+
+#...
+0+0000000 g     F .text	0+0000000 __start
+#...
+0+0000000 g     F .text	0+0000000 start
+#pass
diff --git a/ld/testsuite/ld-elf/attributes.ld b/ld/testsuite/ld-elf/attributes.ld
new file mode 100644
index 0000000..f6cfe4a
--- /dev/null
+++ b/ld/testsuite/ld-elf/attributes.ld
@@ -0,0 +1,9 @@
+PROVIDE ( __start = DEFINED(start) ? start : 0xbfc00000);
+ENTRY (__start)
+SECTIONS
+{
+  .text :
+  {
+    *(.text)
+  }
+}
diff --git a/ld/testsuite/ld-elf/attributes.s b/ld/testsuite/ld-elf/attributes.s
new file mode 100644
index 0000000..bb47536
--- /dev/null
+++ b/ld/testsuite/ld-elf/attributes.s
@@ -0,0 +1,5 @@
+	.text
+	.globl	start
+	.type	start, %function
+start:
+	.byte 0


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