X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Fabi0-conflict%2Ffake-ust.c;fp=tests%2Fregression%2Fabi0-conflict%2Ffake-ust.c;h=f47cdc255f94f5cadc0fa56e91a24ab07248b9da;hb=d2a010d1e67e246e8ab4a847b8bbbdbce2b4e2d7;hp=0000000000000000000000000000000000000000;hpb=6f78600e9600f413ebdf532e154d8946725d83fd;p=lttng-ust.git diff --git a/tests/regression/abi0-conflict/fake-ust.c b/tests/regression/abi0-conflict/fake-ust.c new file mode 100644 index 00000000..f47cdc25 --- /dev/null +++ b/tests/regression/abi0-conflict/fake-ust.c @@ -0,0 +1,37 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (C) 2021 Michael Jeanson + */ + +#include +#include + +#include "./fake-ust.h" + +void init_usterr(void) +{ + fprintf(stderr, "libfakeust0: init_usterr() called.\n"); +} + +/* + * The symbol used by liblttng-ust.so.1 to detect liblttng-ust.so.0 in a + * process. + */ +int ltt_probe_register(struct lttng_probe_desc *desc __attribute__((unused))) +{ + fprintf(stderr, "libfakeust0: ltt_probe_register() called.\n"); + return 0; +} + +/* + * This constructor calls the 'init_usterr' canary function which is provided + * by liblttng-ust.so.1. + */ +static +void fake_ust_ctor(void) + __attribute__((constructor)); +static void fake_ust_ctor(void) +{ + init_usterr(); +}