1*a196c3ffSRichard Lowe/*
2*a196c3ffSRichard Lowe * This file and its contents are supplied under the terms of the
3*a196c3ffSRichard Lowe * Common Development and Distribution License ("CDDL"), version 1.0.
4*a196c3ffSRichard Lowe * You may only use this file in accordance with the terms of version
5*a196c3ffSRichard Lowe * 1.0 of the CDDL.
6*a196c3ffSRichard Lowe *
7*a196c3ffSRichard Lowe * A full copy of the text of the CDDL should have accompanied this
8*a196c3ffSRichard Lowe * source.  A copy of the CDDL is also available via the Internet at
9*a196c3ffSRichard Lowe * http://www.illumos.org/license/CDDL.
10*a196c3ffSRichard Lowe */
11*a196c3ffSRichard Lowe
12*a196c3ffSRichard Lowe/* Copyright 2022, Richard Lowe. */
13*a196c3ffSRichard Lowe
14*a196c3ffSRichard Lowe/*
15*a196c3ffSRichard Lowe * We want to verify that if two sections which otherwise will be merged during
16*a196c3ffSRichard Lowe * the link-edit are members of groups that they are not merged
17*a196c3ffSRichard Lowe * but that if they are of the same group they will be discarded.
18*a196c3ffSRichard Lowe */
19*a196c3ffSRichard Lowe
20*a196c3ffSRichard Lowe	/*
21*a196c3ffSRichard Lowe	 * .test_data_conflict
22*a196c3ffSRichard Lowe	 * A member of group1, one copy will be kept
23*a196c3ffSRichard Lowe	 */
24*a196c3ffSRichard Lowe	.section	.test_data_conflict,"aG",@progbits,group1,comdat
25*a196c3ffSRichard Lowe	.string "2: test_data_conflict (group 1)"
26*a196c3ffSRichard Lowe
27*a196c3ffSRichard Lowe	/*
28*a196c3ffSRichard Lowe	 * .test_data_conflict
29*a196c3ffSRichard Lowe	 * A member of group2.  One copy will be kept, and that copy will _not_
30*a196c3ffSRichard Lowe	 * be merged into a single .test_data_conflict section
31*a196c3ffSRichard Lowe	 */
32*a196c3ffSRichard Lowe	.section	.test_data_conflict,"aG",@progbits,group2,comdat
33*a196c3ffSRichard Lowe	.string "3: test_data_conflict (group 2)"
34*a196c3ffSRichard Lowe
35*a196c3ffSRichard Lowe	/*
36*a196c3ffSRichard Lowe	 * .test_data_conflict
37*a196c3ffSRichard Lowe	 * Not a member of any group.  Both copies will be kept and will be
38*a196c3ffSRichard Lowe	 * merged, but will _not_ be merged into a section that is part of
39*a196c3ffSRichard Lowe	 * a group.
40*a196c3ffSRichard Lowe	 */
41*a196c3ffSRichard Lowe	.section	.test_data_conflict,"a",@progbits
42*a196c3ffSRichard Lowe	.string "4: test_data_conflict (two copies not in group)"
43