aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2004-12-01 23:23:12 +0000
committerPaul Brook <paul@codesourcery.com>2004-12-01 23:23:12 +0000
commit529fcb958524a45f737111d1a42787fdee4d7c66 (patch)
treef38bc24abfe37a22a22ec1bc211564c4a6214fd8 /ld
parent24b4912d646cbc0d98ac21645a48fae56e122f55 (diff)
downloadgdb-529fcb958524a45f737111d1a42787fdee4d7c66.zip
gdb-529fcb958524a45f737111d1a42787fdee4d7c66.tar.gz
gdb-529fcb958524a45f737111d1a42787fdee4d7c66.tar.bz2
2004-12-01 Paul Brook <paul@codesourcery.com>
bfd/ * elflink.c (elf_link_add_object_symbols): Make symbols from discarded sections undefined. ld/testsuite/ * ld-elf/group1.d: New test. * ld-elf/group.ld, ld-elf/group1a.s, ld-elf/group1b.s: New test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-elf/group.ld5
-rw-r--r--ld/testsuite/ld-elf/group1.d9
-rw-r--r--ld/testsuite/ld-elf/group1a.s4
-rw-r--r--ld/testsuite/ld-elf/group1b.s6
5 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 05f91c9..d927189 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-01 Paul Brook <paul@codesourcery.com>
+
+ * ld-elf/group1.d: New test.
+ * ld-elf/group.ld, ld-elf/group1a.s, ld-elf/group1b.s: New test.
+
2004-12-01 Daniel Jacobowitz <dan@codesourcery.com>
* ld-selective/selective.exp: Use -print-libgcc-file-name for
diff --git a/ld/testsuite/ld-elf/group.ld b/ld/testsuite/ld-elf/group.ld
new file mode 100644
index 0000000..d6b27d0
--- /dev/null
+++ b/ld/testsuite/ld-elf/group.ld
@@ -0,0 +1,5 @@
+SECTIONS
+{
+ . = 0x1000;
+ .text : { *(.text) }
+}
diff --git a/ld/testsuite/ld-elf/group1.d b/ld/testsuite/ld-elf/group1.d
new file mode 100644
index 0000000..d2f1b58
--- /dev/null
+++ b/ld/testsuite/ld-elf/group1.d
@@ -0,0 +1,9 @@
+#source: group1a.s
+#source: group1b.s
+#ld: -T group.ld
+#readelf: -s
+Symbol table '.symtab' contains .* entries:
+#...
+ .*: 00001000 0 NOTYPE WEAK DEFAULT . foo
+ .*: 00000000 0 NOTYPE GLOBAL DEFAULT UND bar
+#...
diff --git a/ld/testsuite/ld-elf/group1a.s b/ld/testsuite/ld-elf/group1a.s
new file mode 100644
index 0000000..296e76e
--- /dev/null
+++ b/ld/testsuite/ld-elf/group1a.s
@@ -0,0 +1,4 @@
+ .section .text,"axG",%progbits,foo_group,comdat
+ .weak foo
+foo:
+ .word 0
diff --git a/ld/testsuite/ld-elf/group1b.s b/ld/testsuite/ld-elf/group1b.s
new file mode 100644
index 0000000..b66cba9
--- /dev/null
+++ b/ld/testsuite/ld-elf/group1b.s
@@ -0,0 +1,6 @@
+ .section .text,"axG",%progbits,foo_group,comdat
+ .global foo
+ .global bar
+foo:
+ .word 0
+bar: