1/* Undefined weak symbol loading shared module.
2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#include <sgidefs.h>
20
21 .text
22 .globl x
23 .set nomips16
24 .set nomicromips
25 .ent x
26 .type x, @function
27x:
28 .set noreorder
29#if _MIPS_SIM == _ABIO32
30 .cpload $25
31 jr $31
32 lb $2,%got(a)($28)
33#else
34 .cpsetup $25,$24,x
35 lb $2,%got_disp(a)($28)
36 jr $31
37 .cpreturn
38#endif
39 .set reorder
40 .end x
41 .size x, .-x
42 .weak a
43 .hidden a
44

source code of glibc/sysdeps/mips/tst-undefined-weak-lib.S