aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/testsuite/ld-ctf/data-func-2.c4
-rw-r--r--ld/testsuite/ld-ctf/data-func-conflicted.d4
3 files changed, 12 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 035e6aa..aae8938 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-19 Nick Alcock <nick.alcock@oracle.com>
+
+ * testsuite/ld-ctf/data-func-2.c: Stop removal of the extern foo_t
+ symbols by the optimizer.
+ * testsuite/ld-ctf/data-func-conflicted.d: Adjust accordingly.
+
2021-01-19 Nelson Chu <nelson.chu@sifive.com>
* testsuite/ld-elf/elf.exp (riscv_little_endian): Added. Return true
diff --git a/ld/testsuite/ld-ctf/data-func-2.c b/ld/testsuite/ld-ctf/data-func-2.c
index d00d230..575b06e 100644
--- a/ld/testsuite/ld-ctf/data-func-2.c
+++ b/ld/testsuite/ld-ctf/data-func-2.c
@@ -3,3 +3,7 @@ typedef char foo_t;
/* Conflicting, and indexed. */
extern foo_t var_1;
extern foo_t *var_666;
+
+int other_func(foo_t *);
+
+int ignore (void) { other_func (&var_1); other_func (var_666); }
diff --git a/ld/testsuite/ld-ctf/data-func-conflicted.d b/ld/testsuite/ld-ctf/data-func-conflicted.d
index 6b1e914..1e7c19a 100644
--- a/ld/testsuite/ld-ctf/data-func-conflicted.d
+++ b/ld/testsuite/ld-ctf/data-func-conflicted.d
@@ -14,9 +14,9 @@ Contents of CTF section \.ctf:
Version: 4 \(CTF_VERSION_3\)
#...
Data object section: .* \(0xc bytes\)
- Function info section: .* \(0x40 bytes\)
+ Function info section: .* \(0x44 bytes\)
Object index section: .* \(0xc bytes\)
- Type section: .* \(0xe8 bytes\)
+ Type section: .* \(0xf4 bytes\)
String section: .*
#...
Data objects: