[07/12] ld, ctf: new and adjusted CTF tests due to func info / object data sections

Message ID 20201025141413.363381-8-nick.alcock@oracle.com
State New
Headers show
Series
  • CTF symbol functionality
Related show

Commit Message

Andrea Corallo via Binutils Oct. 25, 2020, 2:14 p.m.
The flags word is nonzero now (so all the tests have been adjusted to
not depend on its content): some of them have data objects and functions
in the data object and function info sections now, rather than in the
variable section or recorded nowhere.  There is a new test for
parent/child relationships and index section emission.

ld/ChangeLog
2020-10-23  Nick Alcock  <nick.alcock@oracle.com>

	* testsuite/ld-ctf/array.d: Adjust for nonzero flags word and
	public symbols in the data section rather than variables: use
	sysv hash style to keep test results the same on non-GNU targets.
	* testsuite/ld-ctf/diag-cttname-null.d: Likewise.
	* testsuite/ld-ctf/diag-cuname.d: Likewise.
	* testsuite/ld-ctf/diag-parlabel.d: Likewise.
	* testsuite/ld-ctf/slice.d: Likewise.
	* testsuite/ld-ctf/function.d: Likewise, but in the function section.
	* testsuite/ld-ctf/conflicting-cycle-1.B-1.d:  Adjust for nonzero
	flags word.
	* testsuite/ld-ctf/conflicting-cycle-1.B-2.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-1.parent.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-2.A-1.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-2.A-2.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-2.parent.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-3.C-1.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-3.C-2.d: Likewise.
	* testsuite/ld-ctf/conflicting-cycle-3.parent.d: Likewise.
	* testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise.
	* testsuite/ld-ctf/cycle-1.d: Likewise.
	* testsuite/ld-ctf/cycle-2.A.d: Likewise.
	* testsuite/ld-ctf/cycle-2.B.d: Likewise.
	* testsuite/ld-ctf/cycle-2.C.d: Likewise.
	* testsuite/ld-ctf/diag-wrong-magic-number-mixed.d:  Likewise.
	* testsuite/ld-ctf/super-sub-cycles.d:  Likewise.
	* testsuite/ld-ctf/data-func-1.c: New test.
	* testsuite/ld-ctf/data-func-2.c: Likewise.
	* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
---
 ld/testsuite/ld-ctf/array.d                   |   11 +-
 ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d |    5 +-
 ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d |    5 +-
 .../ld-ctf/conflicting-cycle-1.parent.d       |    4 +-
 ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d |    1 +
 ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d |    1 +
 .../ld-ctf/conflicting-cycle-2.parent.d       |    6 +-
 ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d |    1 +
 ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d |    1 +
 .../ld-ctf/conflicting-cycle-3.parent.d       |    1 +
 ld/testsuite/ld-ctf/cross-tu-noncyclic.d      |    4 +-
 ld/testsuite/ld-ctf/cycle-1.d                 |    4 +-
 ld/testsuite/ld-ctf/cycle-2.A.d               |    4 +-
 ld/testsuite/ld-ctf/cycle-2.B.d               |    4 +-
 ld/testsuite/ld-ctf/cycle-2.C.d               |    4 +-
 ld/testsuite/ld-ctf/data-func-1.c             | 1031 +++++++++++++++++
 ld/testsuite/ld-ctf/data-func-2.c             |    5 +
 ld/testsuite/ld-ctf/data-func-conflicted.d    |   63 +
 ld/testsuite/ld-ctf/diag-cttname-null.d       |    5 +-
 ld/testsuite/ld-ctf/diag-cuname.d             |   11 +-
 ld/testsuite/ld-ctf/diag-parlabel.d           |   12 +-
 .../ld-ctf/diag-wrong-magic-number-mixed.d    |    1 +
 ld/testsuite/ld-ctf/function.d                |    8 +-
 ld/testsuite/ld-ctf/slice.d                   |   12 +-
 ld/testsuite/ld-ctf/super-sub-cycles.d        |    1 +
 25 files changed, 1160 insertions(+), 45 deletions(-)
 create mode 100644 ld/testsuite/ld-ctf/data-func-1.c
 create mode 100644 ld/testsuite/ld-ctf/data-func-2.c
 create mode 100644 ld/testsuite/ld-ctf/data-func-conflicted.d

-- 
2.29.0.249.g249b51256f

Patch

diff --git a/ld/testsuite/ld-ctf/array.d b/ld/testsuite/ld-ctf/array.d
index f45d68cfda7..82e9939783f 100644
--- a/ld/testsuite/ld-ctf/array.d
+++ b/ld/testsuite/ld-ctf/array.d
@@ -2,7 +2,7 @@ 
 #source: array-char.c
 #source: array-int.c
 #objdump: --ctf=.ctf
-#ld: -shared --ctf-variables
+#ld: -shared --ctf-variables --hash-style=sysv
 #name: Arrays
 
 .*: +file format .*
@@ -12,19 +12,20 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Variable section:	0x0 -- 0xf \(0x10 bytes\)
-    Type section:	0x10 -- 0x6b \(0x5c bytes\)
+#...
+    Data object section:	.* \(0x8 bytes\)
+    Type section:	.* \(0x5c bytes\)
     String section:	.*
 
   Labels:
 
   Data objects:
+    digits -> int \[10\]
+    digits_names -> char \*\[10\]
 
   Function objects:
 
   Variables:
-    digits.*\[10] .*
-    digits.*\[10] .*
 
   Types:
 #...
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d
index 146986bc3d2..40636f062f5 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-1.d
@@ -16,10 +16,11 @@  CTF archive member: .*/B.c:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Parent name: .ctf
     Compilation unit name: .*/B.c
-    Variable section:	0x0 -- 0x7 \(0x8 bytes\)
-    Type section:	0x8 -- 0x1f \(0x18 bytes\)
+#...
+    Type section:	.* \(0x18 bytes\)
     String section:	.*
 
   Labels:
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d
index 48c11a79635..c6fdceb8cf8 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.B-2.d
@@ -16,10 +16,11 @@  CTF archive member: .*/B-2.c:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Parent name: .ctf
     Compilation unit name: .*/B-2.c
-    Variable section:	0x0 -- 0x7 \(0x8 bytes\)
-    Type section:	0x8 -- 0x2b \(0x24 bytes\)
+#...
+    Type section:	.* \(0x24 bytes\)
     String section:	.*
 
   Labels:
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
index 7e0c824da5c..558eb36f2fe 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-1.parent.d
@@ -15,8 +15,8 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Variable section:	0x0 -- 0x17 \(0x18 bytes\)
-    Type section:	0x18 -- 0xc3 \(0xac bytes\)
+#...
+    Type section:	.* \(0xac bytes\)
     String section:	.*
 
   Labels:
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d
index 8929a1f2516..79282a248e6 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-1.d
@@ -18,6 +18,7 @@  CTF archive member: .*/A.c:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Parent name: .*
     Compilation unit name: .*/A.c
 #...
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d
index f65382c7f8e..4f6d44e3577 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.A-2.d
@@ -18,6 +18,7 @@  CTF archive member: .*/A-2.c:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Parent name: .*
     Compilation unit name: .*/A-2.c
 #...
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
index 8fd84886fd3..95aa17d4dd2 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-2.parent.d
@@ -17,9 +17,9 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Variable section:	0x0 -- 0x7 \(0x8 bytes\)
-    Type section:	0x8 -- 0x9b \(0x94 bytes\)
-    String section:	0x9c -- 0xac \(0x11 bytes\)
+#...
+    Type section:	.* \(0x94 bytes\)
+    String section:	.* \(0x1d bytes\)
 
   Labels:
 
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
index fc426de4dcb..48078b93c97 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
@@ -17,6 +17,7 @@  CTF archive member: .*/C.c:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Parent name: .*
     Compilation unit name: .*/C.c
 #...
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d
index d5e59e30c4c..854a71938e4 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-2.d
@@ -17,6 +17,7 @@  CTF archive member: .*/C-2.c:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Parent name: .*
     Compilation unit name: .*/C-2.c
 #...
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d b/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
index 1660821e078..28525b6c4fa 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.parent.d
@@ -16,6 +16,7 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Type section:	0x0 -- 0x57 \(0x58 bytes\)
     String section:	.*
 
diff --git a/ld/testsuite/ld-ctf/cross-tu-noncyclic.d b/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
index b90504abb59..418119a7367 100644
--- a/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
+++ b/ld/testsuite/ld-ctf/cross-tu-noncyclic.d
@@ -14,8 +14,8 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Variable section:	0x0 -- 0x7 \(0x8 bytes\)
-    Type section:	0x8 -- 0x7b \(0x74 bytes\)
+#...
+    Type section:	.* \(0x74 bytes\)
     String section:	.*
 
   Labels:
diff --git a/ld/testsuite/ld-ctf/cycle-1.d b/ld/testsuite/ld-ctf/cycle-1.d
index 145221fa99e..8e9530b3146 100644
--- a/ld/testsuite/ld-ctf/cycle-1.d
+++ b/ld/testsuite/ld-ctf/cycle-1.d
@@ -14,8 +14,8 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Variable section:	0x0 -- 0x1f \(0x20 bytes\)
-    Type section:	0x20 -- 0xc7 \(0xa8 bytes\)
+#...
+    Type section:	.* \(0xa8 bytes\)
     String section:	.*
 
   Labels:
diff --git a/ld/testsuite/ld-ctf/cycle-2.A.d b/ld/testsuite/ld-ctf/cycle-2.A.d
index d224f41683d..a909b90e738 100644
--- a/ld/testsuite/ld-ctf/cycle-2.A.d
+++ b/ld/testsuite/ld-ctf/cycle-2.A.d
@@ -13,8 +13,8 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Variable section:	0x0 -- 0x17 \(0x18 bytes\)
-    Type section:	0x18 -- 0x83 \(0x6c bytes\)
+#...
+    Type section:	.* \(0x6c bytes\)
     String section:	.*
 
   Labels:
diff --git a/ld/testsuite/ld-ctf/cycle-2.B.d b/ld/testsuite/ld-ctf/cycle-2.B.d
index 598b8ca37d2..320e17cc767 100644
--- a/ld/testsuite/ld-ctf/cycle-2.B.d
+++ b/ld/testsuite/ld-ctf/cycle-2.B.d
@@ -13,8 +13,8 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Variable section:	0x0 -- 0x17 \(0x18 bytes\)
-    Type section:	0x18 -- 0x83 \(0x6c bytes\)
+#...
+    Type section:	.* \(0x6c bytes\)
     String section:	.*
 
   Labels:
diff --git a/ld/testsuite/ld-ctf/cycle-2.C.d b/ld/testsuite/ld-ctf/cycle-2.C.d
index 44cdeb56b94..df436062bd3 100644
--- a/ld/testsuite/ld-ctf/cycle-2.C.d
+++ b/ld/testsuite/ld-ctf/cycle-2.C.d
@@ -13,8 +13,8 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Variable section:	0x0 -- 0x17 \(0x18 bytes\)
-    Type section:	0x18 -- 0x83 \(0x6c bytes\)
+#...
+    Type section:	.* \(0x6c bytes\)
     String section:	.*
 
   Labels:
diff --git a/ld/testsuite/ld-ctf/data-func-1.c b/ld/testsuite/ld-ctf/data-func-1.c
new file mode 100644
index 00000000000..2b9628b0450
--- /dev/null
+++ b/ld/testsuite/ld-ctf/data-func-1.c
@@ -0,0 +1,1031 @@ 
+typedef int foo_t;
+
+/* This type shares a name with a public data symbol, to make sure that at least
+   one thing in the type section is using an external string.  */
+
+struct var_3 { int foo; } bar;
+
+/* Data objects.  */
+foo_t var_1;
+foo_t var_2;
+foo_t var_3;
+foo_t var_4;
+foo_t var_5;
+foo_t var_6;
+foo_t var_7;
+foo_t var_8;
+foo_t var_9;
+foo_t var_10;
+foo_t var_11;
+foo_t var_12;
+foo_t var_13;
+foo_t var_14;
+foo_t var_15;
+foo_t var_16;
+foo_t var_17;
+foo_t var_18;
+foo_t var_19;
+foo_t var_20;
+foo_t var_21;
+foo_t var_22;
+foo_t var_23;
+foo_t var_24;
+foo_t var_25;
+foo_t var_26;
+foo_t var_27;
+foo_t var_28;
+foo_t var_29;
+foo_t var_30;
+foo_t var_31;
+foo_t var_32;
+foo_t var_33;
+foo_t var_34;
+foo_t var_35;
+foo_t var_36;
+foo_t var_37;
+foo_t var_38;
+foo_t var_39;
+foo_t var_40;
+foo_t var_41;
+foo_t var_42;
+foo_t var_43;
+foo_t var_44;
+foo_t var_45;
+foo_t var_46;
+foo_t var_47;
+foo_t var_48;
+foo_t var_49;
+foo_t var_50;
+foo_t var_51;
+foo_t var_52;
+foo_t var_53;
+foo_t var_54;
+foo_t var_55;
+foo_t var_56;
+foo_t var_57;
+foo_t var_58;
+foo_t var_59;
+foo_t var_60;
+foo_t var_61;
+foo_t var_62;
+foo_t var_63;
+foo_t var_64;
+foo_t var_65;
+foo_t var_66;
+foo_t var_67;
+foo_t var_68;
+foo_t var_69;
+foo_t var_70;
+foo_t var_71;
+foo_t var_72;
+foo_t var_73;
+foo_t var_74;
+foo_t var_75;
+foo_t var_76;
+foo_t var_77;
+foo_t var_78;
+foo_t var_79;
+foo_t var_80;
+foo_t var_81;
+foo_t var_82;
+foo_t var_83;
+foo_t var_84;
+foo_t var_85;
+foo_t var_86;
+foo_t var_87;
+foo_t var_88;
+foo_t var_89;
+foo_t var_90;
+foo_t var_91;
+foo_t var_92;
+foo_t var_93;
+foo_t var_94;
+foo_t var_95;
+foo_t var_96;
+foo_t var_97;
+foo_t var_98;
+foo_t var_99;
+foo_t var_100;
+foo_t var_101;
+foo_t var_102;
+foo_t var_103;
+foo_t var_104;
+foo_t var_105;
+foo_t var_106;
+foo_t var_107;
+foo_t var_108;
+foo_t var_109;
+foo_t var_110;
+foo_t var_111;
+foo_t var_112;
+foo_t var_113;
+foo_t var_114;
+foo_t var_115;
+foo_t var_116;
+foo_t var_117;
+foo_t var_118;
+foo_t var_119;
+foo_t var_120;
+foo_t var_121;
+foo_t var_122;
+foo_t var_123;
+foo_t var_124;
+foo_t var_125;
+foo_t var_126;
+foo_t var_127;
+foo_t var_128;
+foo_t var_129;
+foo_t var_130;
+foo_t var_131;
+foo_t var_132;
+foo_t var_133;
+foo_t var_134;
+foo_t var_135;
+foo_t var_136;
+foo_t var_137;
+foo_t var_138;
+foo_t var_139;
+foo_t var_140;
+foo_t var_141;
+foo_t var_142;
+foo_t var_143;
+foo_t var_144;
+foo_t var_145;
+foo_t var_146;
+foo_t var_147;
+foo_t var_148;
+foo_t var_149;
+foo_t var_150;
+foo_t var_151;
+foo_t var_152;
+foo_t var_153;
+foo_t var_154;
+foo_t var_155;
+foo_t var_156;
+foo_t var_157;
+foo_t var_158;
+foo_t var_159;
+foo_t var_160;
+foo_t var_161;
+foo_t var_162;
+foo_t var_163;
+foo_t var_164;
+foo_t var_165;
+foo_t var_166;
+foo_t var_167;
+foo_t var_168;
+foo_t var_169;
+foo_t var_170;
+foo_t var_171;
+foo_t var_172;
+foo_t var_173;
+foo_t var_174;
+foo_t var_175;
+foo_t var_176;
+foo_t var_177;
+foo_t var_178;
+foo_t var_179;
+foo_t var_180;
+foo_t var_181;
+foo_t var_182;
+foo_t var_183;
+foo_t var_184;
+foo_t var_185;
+foo_t var_186;
+foo_t var_187;
+foo_t var_188;
+foo_t var_189;
+foo_t var_190;
+foo_t var_191;
+foo_t var_192;
+foo_t var_193;
+foo_t var_194;
+foo_t var_195;
+foo_t var_196;
+foo_t var_197;
+foo_t var_198;
+foo_t var_199;
+foo_t var_200;
+foo_t var_201;
+foo_t var_202;
+foo_t var_203;
+foo_t var_204;
+foo_t var_205;
+foo_t var_206;
+foo_t var_207;
+foo_t var_208;
+foo_t var_209;
+foo_t var_210;
+foo_t var_211;
+foo_t var_212;
+foo_t var_213;
+foo_t var_214;
+foo_t var_215;
+foo_t var_216;
+foo_t var_217;
+foo_t var_218;
+foo_t var_219;
+foo_t var_220;
+foo_t var_221;
+foo_t var_222;
+foo_t var_223;
+foo_t var_224;
+foo_t var_225;
+foo_t var_226;
+foo_t var_227;
+foo_t var_228;
+foo_t var_229;
+foo_t var_230;
+foo_t var_231;
+foo_t var_232;
+foo_t var_233;
+foo_t var_234;
+foo_t var_235;
+foo_t var_236;
+foo_t var_237;
+foo_t var_238;
+foo_t var_239;
+foo_t var_240;
+foo_t var_241;
+foo_t var_242;
+foo_t var_243;
+foo_t var_244;
+foo_t var_245;
+foo_t var_246;
+foo_t var_247;
+foo_t var_248;
+foo_t var_249;
+foo_t var_250;
+foo_t var_251;
+foo_t var_252;
+foo_t var_253;
+foo_t var_254;
+foo_t var_255;
+foo_t var_256;
+foo_t var_257;
+foo_t var_258;
+foo_t var_259;
+foo_t var_260;
+foo_t var_261;
+foo_t var_262;
+foo_t var_263;
+foo_t var_264;
+foo_t var_265;
+foo_t var_266;
+foo_t var_267;
+foo_t var_268;
+foo_t var_269;
+foo_t var_270;
+foo_t var_271;
+foo_t var_272;
+foo_t var_273;
+foo_t var_274;
+foo_t var_275;
+foo_t var_276;
+foo_t var_277;
+foo_t var_278;
+foo_t var_279;
+foo_t var_280;
+foo_t var_281;
+foo_t var_282;
+foo_t var_283;
+foo_t var_284;
+foo_t var_285;
+foo_t var_286;
+foo_t var_287;
+foo_t var_288;
+foo_t var_289;
+foo_t var_290;
+foo_t var_291;
+foo_t var_292;
+foo_t var_293;
+foo_t var_294;
+foo_t var_295;
+foo_t var_296;
+foo_t var_297;
+foo_t var_298;
+foo_t var_299;
+foo_t var_300;
+foo_t var_301;
+foo_t var_302;
+foo_t var_303;
+foo_t var_304;
+foo_t var_305;
+foo_t var_306;
+foo_t var_307;
+foo_t var_308;
+foo_t var_309;
+foo_t var_310;
+foo_t var_311;
+foo_t var_312;
+foo_t var_313;
+foo_t var_314;
+foo_t var_315;
+foo_t var_316;
+foo_t var_317;
+foo_t var_318;
+foo_t var_319;
+foo_t var_320;
+foo_t var_321;
+foo_t var_322;
+foo_t var_323;
+foo_t var_324;
+foo_t var_325;
+foo_t var_326;
+foo_t var_327;
+foo_t var_328;
+foo_t var_329;
+foo_t var_330;
+foo_t var_331;
+foo_t var_332;
+foo_t var_333;
+foo_t var_334;
+foo_t var_335;
+foo_t var_336;
+foo_t var_337;
+foo_t var_338;
+foo_t var_339;
+foo_t var_340;
+foo_t var_341;
+foo_t var_342;
+foo_t var_343;
+foo_t var_344;
+foo_t var_345;
+foo_t var_346;
+foo_t var_347;
+foo_t var_348;
+foo_t var_349;
+foo_t var_350;
+foo_t var_351;
+foo_t var_352;
+foo_t var_353;
+foo_t var_354;
+foo_t var_355;
+foo_t var_356;
+foo_t var_357;
+foo_t var_358;
+foo_t var_359;
+foo_t var_360;
+foo_t var_361;
+foo_t var_362;
+foo_t var_363;
+foo_t var_364;
+foo_t var_365;
+foo_t var_366;
+foo_t var_367;
+foo_t var_368;
+foo_t var_369;
+foo_t var_370;
+foo_t var_371;
+foo_t var_372;
+foo_t var_373;
+foo_t var_374;
+foo_t var_375;
+foo_t var_376;
+foo_t var_377;
+foo_t var_378;
+foo_t var_379;
+foo_t var_380;
+foo_t var_381;
+foo_t var_382;
+foo_t var_383;
+foo_t var_384;
+foo_t var_385;
+foo_t var_386;
+foo_t var_387;
+foo_t var_388;
+foo_t var_389;
+foo_t var_390;
+foo_t var_391;
+foo_t var_392;
+foo_t var_393;
+foo_t var_394;
+foo_t var_395;
+foo_t var_396;
+foo_t var_397;
+foo_t var_398;
+foo_t var_399;
+foo_t var_400;
+foo_t var_401;
+foo_t var_402;
+foo_t var_403;
+foo_t var_404;
+foo_t var_405;
+foo_t var_406;
+foo_t var_407;
+foo_t var_408;
+foo_t var_409;
+foo_t var_410;
+foo_t var_411;
+foo_t var_412;
+foo_t var_413;
+foo_t var_414;
+foo_t var_415;
+foo_t var_416;
+foo_t var_417;
+foo_t var_418;
+foo_t var_419;
+foo_t var_420;
+foo_t var_421;
+foo_t var_422;
+foo_t var_423;
+foo_t var_424;
+foo_t var_425;
+foo_t var_426;
+foo_t var_427;
+foo_t var_428;
+foo_t var_429;
+foo_t var_430;
+foo_t var_431;
+foo_t var_432;
+foo_t var_433;
+foo_t var_434;
+foo_t var_435;
+foo_t var_436;
+foo_t var_437;
+foo_t var_438;
+foo_t var_439;
+foo_t var_440;
+foo_t var_441;
+foo_t var_442;
+foo_t var_443;
+foo_t var_444;
+foo_t var_445;
+foo_t var_446;
+foo_t var_447;
+foo_t var_448;
+foo_t var_449;
+foo_t var_450;
+foo_t var_451;
+foo_t var_452;
+foo_t var_453;
+foo_t var_454;
+foo_t var_455;
+foo_t var_456;
+foo_t var_457;
+foo_t var_458;
+foo_t var_459;
+foo_t var_460;
+foo_t var_461;
+foo_t var_462;
+foo_t var_463;
+foo_t var_464;
+foo_t var_465;
+foo_t var_466;
+foo_t var_467;
+foo_t var_468;
+foo_t var_469;
+foo_t var_470;
+foo_t var_471;
+foo_t var_472;
+foo_t var_473;
+foo_t var_474;
+foo_t var_475;
+foo_t var_476;
+foo_t var_477;
+foo_t var_478;
+foo_t var_479;
+foo_t var_480;
+foo_t var_481;
+foo_t var_482;
+foo_t var_483;
+foo_t var_484;
+foo_t var_485;
+foo_t var_486;
+foo_t var_487;
+foo_t var_488;
+foo_t var_489;
+foo_t var_490;
+foo_t var_491;
+foo_t var_492;
+foo_t var_493;
+foo_t var_494;
+foo_t var_495;
+foo_t var_496;
+foo_t var_497;
+foo_t var_498;
+foo_t var_499;
+foo_t var_500;
+foo_t var_501;
+foo_t var_502;
+foo_t var_503;
+foo_t var_504;
+foo_t var_505;
+foo_t var_506;
+foo_t var_507;
+foo_t var_508;
+foo_t var_509;
+foo_t var_510;
+foo_t var_511;
+foo_t var_512;
+foo_t var_513;
+foo_t var_514;
+foo_t var_515;
+foo_t var_516;
+foo_t var_517;
+foo_t var_518;
+foo_t var_519;
+foo_t var_520;
+foo_t var_521;
+foo_t var_522;
+foo_t var_523;
+foo_t var_524;
+foo_t var_525;
+foo_t var_526;
+foo_t var_527;
+foo_t var_528;
+foo_t var_529;
+foo_t var_530;
+foo_t var_531;
+foo_t var_532;
+foo_t var_533;
+foo_t var_534;
+foo_t var_535;
+foo_t var_536;
+foo_t var_537;
+foo_t var_538;
+foo_t var_539;
+foo_t var_540;
+foo_t var_541;
+foo_t var_542;
+foo_t var_543;
+foo_t var_544;
+foo_t var_545;
+foo_t var_546;
+foo_t var_547;
+foo_t var_548;
+foo_t var_549;
+foo_t var_550;
+foo_t var_551;
+foo_t var_552;
+foo_t var_553;
+foo_t var_554;
+foo_t var_555;
+foo_t var_556;
+foo_t var_557;
+foo_t var_558;
+foo_t var_559;
+foo_t var_560;
+foo_t var_561;
+foo_t var_562;
+foo_t var_563;
+foo_t var_564;
+foo_t var_565;
+foo_t var_566;
+foo_t var_567;
+foo_t var_568;
+foo_t var_569;
+foo_t var_570;
+foo_t var_571;
+foo_t var_572;
+foo_t var_573;
+foo_t var_574;
+foo_t var_575;
+foo_t var_576;
+foo_t var_577;
+foo_t var_578;
+foo_t var_579;
+foo_t var_580;
+foo_t var_581;
+foo_t var_582;
+foo_t var_583;
+foo_t var_584;
+foo_t var_585;
+foo_t var_586;
+foo_t var_587;
+foo_t var_588;
+foo_t var_589;
+foo_t var_590;
+foo_t var_591;
+foo_t var_592;
+foo_t var_593;
+foo_t var_594;
+foo_t var_595;
+foo_t var_596;
+foo_t var_597;
+foo_t var_598;
+foo_t var_599;
+foo_t var_600;
+foo_t var_601;
+foo_t var_602;
+foo_t var_603;
+foo_t var_604;
+foo_t var_605;
+foo_t var_606;
+foo_t var_607;
+foo_t var_608;
+foo_t var_609;
+foo_t var_610;
+foo_t var_611;
+foo_t var_612;
+foo_t var_613;
+foo_t var_614;
+foo_t var_615;
+foo_t var_616;
+foo_t var_617;
+foo_t var_618;
+foo_t var_619;
+foo_t var_620;
+foo_t var_621;
+foo_t var_622;
+foo_t var_623;
+foo_t var_624;
+foo_t var_625;
+foo_t var_626;
+foo_t var_627;
+foo_t var_628;
+foo_t var_629;
+foo_t var_630;
+foo_t var_631;
+foo_t var_632;
+foo_t var_633;
+foo_t var_634;
+foo_t var_635;
+foo_t var_636;
+foo_t var_637;
+foo_t var_638;
+foo_t var_639;
+foo_t var_640;
+foo_t var_641;
+foo_t var_642;
+foo_t var_643;
+foo_t var_644;
+foo_t var_645;
+foo_t var_646;
+foo_t var_647;
+foo_t var_648;
+foo_t var_649;
+foo_t var_650;
+foo_t var_651;
+foo_t var_652;
+foo_t var_653;
+foo_t var_654;
+foo_t var_655;
+foo_t var_656;
+foo_t var_657;
+foo_t var_658;
+foo_t var_659;
+foo_t var_660;
+foo_t var_661;
+foo_t var_662;
+foo_t var_663;
+foo_t var_664;
+foo_t var_665;
+foo_t var_666;
+foo_t var_667;
+foo_t var_668;
+foo_t var_669;
+foo_t var_670;
+foo_t var_671;
+foo_t var_672;
+foo_t var_673;
+foo_t var_674;
+foo_t var_675;
+foo_t var_676;
+foo_t var_677;
+foo_t var_678;
+foo_t var_679;
+foo_t var_680;
+foo_t var_681;
+foo_t var_682;
+foo_t var_683;
+foo_t var_684;
+foo_t var_685;
+foo_t var_686;
+foo_t var_687;
+foo_t var_688;
+foo_t var_689;
+foo_t var_690;
+foo_t var_691;
+foo_t var_692;
+foo_t var_693;
+foo_t var_694;
+foo_t var_695;
+foo_t var_696;
+foo_t var_697;
+foo_t var_698;
+foo_t var_699;
+foo_t var_700;
+foo_t var_701;
+foo_t var_702;
+foo_t var_703;
+foo_t var_704;
+foo_t var_705;
+foo_t var_706;
+foo_t var_707;
+foo_t var_708;
+foo_t var_709;
+foo_t var_710;
+foo_t var_711;
+foo_t var_712;
+foo_t var_713;
+foo_t var_714;
+foo_t var_715;
+foo_t var_716;
+foo_t var_717;
+foo_t var_718;
+foo_t var_719;
+foo_t var_720;
+foo_t var_721;
+foo_t var_722;
+foo_t var_723;
+foo_t var_724;
+foo_t var_725;
+foo_t var_726;
+foo_t var_727;
+foo_t var_728;
+foo_t var_729;
+foo_t var_730;
+foo_t var_731;
+foo_t var_732;
+foo_t var_733;
+foo_t var_734;
+foo_t var_735;
+foo_t var_736;
+foo_t var_737;
+foo_t var_738;
+foo_t var_739;
+foo_t var_740;
+foo_t var_741;
+foo_t var_742;
+foo_t var_743;
+foo_t var_744;
+foo_t var_745;
+foo_t var_746;
+foo_t var_747;
+foo_t var_748;
+foo_t var_749;
+foo_t var_750;
+foo_t var_751;
+foo_t var_752;
+foo_t var_753;
+foo_t var_754;
+foo_t var_755;
+foo_t var_756;
+foo_t var_757;
+foo_t var_758;
+foo_t var_759;
+foo_t var_760;
+foo_t var_761;
+foo_t var_762;
+foo_t var_763;
+foo_t var_764;
+foo_t var_765;
+foo_t var_766;
+foo_t var_767;
+foo_t var_768;
+foo_t var_769;
+foo_t var_770;
+foo_t var_771;
+foo_t var_772;
+foo_t var_773;
+foo_t var_774;
+foo_t var_775;
+foo_t var_776;
+foo_t var_777;
+foo_t var_778;
+foo_t var_779;
+foo_t var_780;
+foo_t var_781;
+foo_t var_782;
+foo_t var_783;
+foo_t var_784;
+foo_t var_785;
+foo_t var_786;
+foo_t var_787;
+foo_t var_788;
+foo_t var_789;
+foo_t var_790;
+foo_t var_791;
+foo_t var_792;
+foo_t var_793;
+foo_t var_794;
+foo_t var_795;
+foo_t var_796;
+foo_t var_797;
+foo_t var_798;
+foo_t var_799;
+foo_t var_800;
+foo_t var_801;
+foo_t var_802;
+foo_t var_803;
+foo_t var_804;
+foo_t var_805;
+foo_t var_806;
+foo_t var_807;
+foo_t var_808;
+foo_t var_809;
+foo_t var_810;
+foo_t var_811;
+foo_t var_812;
+foo_t var_813;
+foo_t var_814;
+foo_t var_815;
+foo_t var_816;
+foo_t var_817;
+foo_t var_818;
+foo_t var_819;
+foo_t var_820;
+foo_t var_821;
+foo_t var_822;
+foo_t var_823;
+foo_t var_824;
+foo_t var_825;
+foo_t var_826;
+foo_t var_827;
+foo_t var_828;
+foo_t var_829;
+foo_t var_830;
+foo_t var_831;
+foo_t var_832;
+foo_t var_833;
+foo_t var_834;
+foo_t var_835;
+foo_t var_836;
+foo_t var_837;
+foo_t var_838;
+foo_t var_839;
+foo_t var_840;
+foo_t var_841;
+foo_t var_842;
+foo_t var_843;
+foo_t var_844;
+foo_t var_845;
+foo_t var_846;
+foo_t var_847;
+foo_t var_848;
+foo_t var_849;
+foo_t var_850;
+foo_t var_851;
+foo_t var_852;
+foo_t var_853;
+foo_t var_854;
+foo_t var_855;
+foo_t var_856;
+foo_t var_857;
+foo_t var_858;
+foo_t var_859;
+foo_t var_860;
+foo_t var_861;
+foo_t var_862;
+foo_t var_863;
+foo_t var_864;
+foo_t var_865;
+foo_t var_866;
+foo_t var_867;
+foo_t var_868;
+foo_t var_869;
+foo_t var_870;
+foo_t var_871;
+foo_t var_872;
+foo_t var_873;
+foo_t var_874;
+foo_t var_875;
+foo_t var_876;
+foo_t var_877;
+foo_t var_878;
+foo_t var_879;
+foo_t var_880;
+foo_t var_881;
+foo_t var_882;
+foo_t var_883;
+foo_t var_884;
+foo_t var_885;
+foo_t var_886;
+foo_t var_887;
+foo_t var_888;
+foo_t var_889;
+foo_t var_890;
+foo_t var_891;
+foo_t var_892;
+foo_t var_893;
+foo_t var_894;
+foo_t var_895;
+foo_t var_896;
+foo_t var_897;
+foo_t var_898;
+foo_t var_899;
+foo_t var_900;
+foo_t var_901;
+foo_t var_902;
+foo_t var_903;
+foo_t var_904;
+foo_t var_905;
+foo_t var_906;
+foo_t var_907;
+foo_t var_908;
+foo_t var_909;
+foo_t var_910;
+foo_t var_911;
+foo_t var_912;
+foo_t var_913;
+foo_t var_914;
+foo_t var_915;
+foo_t var_916;
+foo_t var_917;
+foo_t var_918;
+foo_t var_919;
+foo_t var_920;
+foo_t var_921;
+foo_t var_922;
+foo_t var_923;
+foo_t var_924;
+foo_t var_925;
+foo_t var_926;
+foo_t var_927;
+foo_t var_928;
+foo_t var_929;
+foo_t var_930;
+foo_t var_931;
+foo_t var_932;
+foo_t var_933;
+foo_t var_934;
+foo_t var_935;
+foo_t var_936;
+foo_t var_937;
+foo_t var_938;
+foo_t var_939;
+foo_t var_940;
+foo_t var_941;
+foo_t var_942;
+foo_t var_943;
+foo_t var_944;
+foo_t var_945;
+foo_t var_946;
+foo_t var_947;
+foo_t var_948;
+foo_t var_949;
+foo_t var_950;
+foo_t var_951;
+foo_t var_952;
+foo_t var_953;
+foo_t var_954;
+foo_t var_955;
+foo_t var_956;
+foo_t var_957;
+foo_t var_958;
+foo_t var_959;
+foo_t var_960;
+foo_t var_961;
+foo_t var_962;
+foo_t var_963;
+foo_t var_964;
+foo_t var_965;
+foo_t var_966;
+foo_t var_967;
+foo_t var_968;
+foo_t var_969;
+foo_t var_970;
+foo_t var_971;
+foo_t var_972;
+foo_t var_973;
+foo_t var_974;
+foo_t var_975;
+foo_t var_976;
+foo_t var_977;
+foo_t var_978;
+foo_t var_979;
+foo_t var_980;
+foo_t var_981;
+foo_t var_982;
+foo_t var_983;
+foo_t var_984;
+foo_t var_985;
+foo_t var_986;
+foo_t var_987;
+foo_t var_988;
+foo_t var_989;
+foo_t var_990;
+foo_t var_991;
+foo_t var_992;
+foo_t var_993;
+foo_t var_994;
+foo_t var_995;
+foo_t var_996;
+foo_t var_997;
+foo_t var_998;
+foo_t var_999;
+foo_t var_1000;
+
+/* Function objects.  */
+
+void *func_1 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_2 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_3 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_4 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_5 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_6 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_7 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_8 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_9 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_10 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_11 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_12 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_13 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_14 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_15 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+void *func_16 (const char * restrict foo, int (*blah) (char const *bar)) { return 0; }
+
+static void *(*funcs[]) (const char * restrict, int (*) (char const *)) = { func_1, func_2, func_3, func_4, func_5, func_6, func_7, func_8, func_9, func_10, func_11, func_12, func_13, func_14, func_15, func_16 };
+
+static void *foo (void) { return &funcs; }
diff --git a/ld/testsuite/ld-ctf/data-func-2.c b/ld/testsuite/ld-ctf/data-func-2.c
new file mode 100644
index 00000000000..d00d2309692
--- /dev/null
+++ b/ld/testsuite/ld-ctf/data-func-2.c
@@ -0,0 +1,5 @@ 
+typedef char foo_t;
+
+/* Conflicting, and indexed.  */
+extern foo_t var_1;
+extern foo_t *var_666;
diff --git a/ld/testsuite/ld-ctf/data-func-conflicted.d b/ld/testsuite/ld-ctf/data-func-conflicted.d
new file mode 100644
index 00000000000..626bfef052e
--- /dev/null
+++ b/ld/testsuite/ld-ctf/data-func-conflicted.d
@@ -0,0 +1,63 @@ 
+#as:
+#source: data-func-1.c
+#source: data-func-2.c
+#objdump: --ctf=.ctf
+#ld: -shared -s
+#name: Conflicted data syms, partially indexed, stripped
+
+.*: +file format .*
+
+Contents of CTF section \.ctf:
+
+  Header:
+    Magic number: dff2
+    Version: 4 \(CTF_VERSION_3\)
+#...
+    Data object section:	.* \(0xc bytes\)
+    Function info section:	.* \(0x40 bytes\)
+    Object index section:	.* \(0xc bytes\)
+    Type section:	.* \(0x228 bytes\)
+    String section:	.*
+#...
+  Data objects:
+    bar -> struct var_3
+    var_1 -> foo_t
+    var_666 -> foo_t \*
+
+  Function objects:
+    func_[0-9]* -> void \*\(\*\) \(const char \*restrict, int \(\*\)\(\*\) \(const char \*\)\)
+#...
+  Types:
+#...
+   .*: struct var_3 .*
+#...
+CTF archive member: .*/data-func-1\.c:
+
+  Header:
+    Magic number: dff2
+    Version: 4 \(CTF_VERSION_3\)
+#...
+    Parent name: \.ctf
+    Compilation unit name: .*/data-func-1\.c
+    Data object section:	.* \(0xfa4 bytes\)
+    Type section:	.* \(0xc bytes\)
+    String section:	.*
+
+  Labels:
+
+  Data objects:
+    var_[0-9]* -> foo_t
+    var_[0-9]* -> foo_t
+    var_[0-9]* -> foo_t
+    var_[0-9]* -> foo_t
+    var_[0-9]* -> foo_t
+    var_[0-9]* -> foo_t
+    var_[0-9]* -> foo_t
+#...
+  Function objects:
+
+  Variables:
+
+  Types:
+     80000001: foo_t .* -> .* int .*
+#...
diff --git a/ld/testsuite/ld-ctf/diag-cttname-null.d b/ld/testsuite/ld-ctf/diag-cttname-null.d
index 17df7d6a7bf..4523dbc5e2f 100644
--- a/ld/testsuite/ld-ctf/diag-cttname-null.d
+++ b/ld/testsuite/ld-ctf/diag-cttname-null.d
@@ -12,9 +12,8 @@  Contents of CTF section .ctf:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
 #...
-  Variables:
-#...
-    a ->  [0-9a-f]*: struct  \(.*
+  Data objects:
+    a -> struct 
 #...
   Types:
 #...
diff --git a/ld/testsuite/ld-ctf/diag-cuname.d b/ld/testsuite/ld-ctf/diag-cuname.d
index e243008e0c5..45e9a7e6771 100644
--- a/ld/testsuite/ld-ctf/diag-cuname.d
+++ b/ld/testsuite/ld-ctf/diag-cuname.d
@@ -11,21 +11,22 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Compilation unit name: \(\?\)
-    Variable section:	.*
+#...
+    Data object section:	.*
     Type section:	.*
     String section:	.*
 
   Labels:
 
   Data objects:
-
+    a -> struct A
+#...
   Function objects:
 
   Variables:
-#...
-    a ->  [0-9a-f]*: struct A \(.*
-#...
+
   Types:
 #...
      [0-9a-f]*: struct A \(.*
diff --git a/ld/testsuite/ld-ctf/diag-parlabel.d b/ld/testsuite/ld-ctf/diag-parlabel.d
index 7e328176cfd..f0f40243310 100644
--- a/ld/testsuite/ld-ctf/diag-parlabel.d
+++ b/ld/testsuite/ld-ctf/diag-parlabel.d
@@ -11,21 +11,21 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Compilation unit name: .*A.c
-    Variable section:	0x0 -- 0x7 \(0x8 bytes\)
-    Type section:	0x8 -- 0x37 \(0x30 bytes\)
+    Data object section:	0x0 -- 0x3 \(0x4 bytes\)
+    Type section:	0x4 -- 0x33 \(0x30 bytes\)
     String section:	.*
 
   Labels:
 
   Data objects:
-
+    a -> struct A
+#...
   Function objects:
 
   Variables:
-#...
-    a ->  [0-9a-f]*: struct A \(.*
-#...
+
   Types:
 #...
      [0-9a-f]*: struct A \(.*
diff --git a/ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d b/ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d
index 1e3344750c9..cb394985d93 100644
--- a/ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d
+++ b/ld/testsuite/ld-ctf/diag-wrong-magic-number-mixed.d
@@ -12,6 +12,7 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Variable section:	0x0 -- 0x17 \(0x18 bytes\)
     Type section:	0x18 -- 0x83 \(0x6c bytes\)
     String section:	.*
diff --git a/ld/testsuite/ld-ctf/function.d b/ld/testsuite/ld-ctf/function.d
index 0ed8eece1bb..f5303d7c3ba 100644
--- a/ld/testsuite/ld-ctf/function.d
+++ b/ld/testsuite/ld-ctf/function.d
@@ -11,10 +11,14 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
-    Compilation unit name: .*function.c
 #...
-    Type section:	0x0 -- 0x8f \(0x90 bytes\)
+    Compilation unit name: .*function.c
+    Function info section:	.* \(0x4 bytes\)
+    Type section:	.* \(0x90 bytes\)
     String section:	.*
+#...
+  Function objects:
+    foo -> int \(\*\) \(char, int, float, void \*, void \(\*\)\(\*\) \(int\)\)
 #...
   Types:
 #...
diff --git a/ld/testsuite/ld-ctf/slice.d b/ld/testsuite/ld-ctf/slice.d
index b594553568c..b493ce05c75 100644
--- a/ld/testsuite/ld-ctf/slice.d
+++ b/ld/testsuite/ld-ctf/slice.d
@@ -11,14 +11,16 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Compilation unit name: .*slice.c
-    Variable section:	0x0 -- 0x7 \(0x8 bytes\)
-    Type section:	0x8 -- 0xa3 \(0x9c bytes\)
+#...
+    Data object section:	.* \(0x4 bytes\)
+    Type section:	.* \(0x9c bytes\)
     String section:	.*
 #...
-  Variables:
-    slices ->  [0-9a-f]*: struct slices \(size 0x4\)
-
+  Data objects:
+    slices -> struct slices
+#...
   Types:
 #...
      [0-9a-f]*: struct slices \(size 0x[0-9a-f]*\)
diff --git a/ld/testsuite/ld-ctf/super-sub-cycles.d b/ld/testsuite/ld-ctf/super-sub-cycles.d
index 8a46f16f496..e4707d331e6 100644
--- a/ld/testsuite/ld-ctf/super-sub-cycles.d
+++ b/ld/testsuite/ld-ctf/super-sub-cycles.d
@@ -11,6 +11,7 @@  Contents of CTF section .ctf:
   Header:
     Magic number: dff2
     Version: 4 \(CTF_VERSION_3\)
+#...
     Compilation unit name: .*super-sub-cycles.c
 #...
     Type section:	.*\(0x108 bytes\)