|
Packit Service |
8042e0 |
/* MIPS-specific handling of undefined symbols.
|
|
Packit Service |
8042e0 |
Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
|
Packit Service |
8042e0 |
This file is part of the GNU C Library.
|
|
Packit Service |
8042e0 |
|
|
Packit Service |
8042e0 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
8042e0 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
8042e0 |
License as published by the Free Software Foundation; either
|
|
Packit Service |
8042e0 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
8042e0 |
|
|
Packit Service |
8042e0 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
8042e0 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
8042e0 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
8042e0 |
Lesser General Public License for more details.
|
|
Packit Service |
8042e0 |
|
|
Packit Service |
8042e0 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
8042e0 |
License along with the GNU C Library; if not, see
|
|
Packit Service |
8042e0 |
<https://www.gnu.org/licenses/>. */
|
|
Packit Service |
8042e0 |
|
|
Packit Service |
8042e0 |
#ifndef _ELF_MACHINE_SYM_NO_MATCH_H
|
|
Packit Service |
8042e0 |
#define _ELF_MACHINE_SYM_NO_MATCH_H
|
|
Packit Service |
8042e0 |
|
|
Packit Service |
8042e0 |
#include <link.h>
|
|
Packit Service |
8042e0 |
#include <stdbool.h>
|
|
Packit Service |
8042e0 |
|
|
Packit Service |
8042e0 |
/* The semantics of zero/non-zero values of undefined symbols differs
|
|
Packit Service |
8042e0 |
depending on whether the non-PIC ABI is in use. Under the non-PIC
|
|
Packit Service |
8042e0 |
ABI, a non-zero value indicates that there is an address reference
|
|
Packit Service |
8042e0 |
to the symbol and thus it must always be resolved (except when
|
|
Packit Service |
8042e0 |
resolving a jump slot relocation) to the PLT entry whose address is
|
|
Packit Service |
8042e0 |
provided as the symbol's value; a zero value indicates that this
|
|
Packit Service |
8042e0 |
canonical-address behaviour is not required. Yet under the classic
|
|
Packit Service |
8042e0 |
MIPS psABI, a zero value indicates that there is an address
|
|
Packit Service |
8042e0 |
reference to the function and the dynamic linker must resolve the
|
|
Packit Service |
8042e0 |
symbol immediately upon loading. To avoid conflict, symbols for
|
|
Packit Service |
8042e0 |
which the dynamic linker must assume the non-PIC ABI semantics are
|
|
Packit Service |
8042e0 |
marked with the STO_MIPS_PLT flag. */
|
|
Packit Service |
8042e0 |
static inline bool
|
|
Packit Service |
8042e0 |
elf_machine_sym_no_match (const ElfW(Sym) *sym)
|
|
Packit Service |
8042e0 |
{
|
|
Packit Service |
8042e0 |
return sym->st_shndx == SHN_UNDEF && !(sym->st_other & STO_MIPS_PLT);
|
|
Packit Service |
8042e0 |
}
|
|
Packit Service |
8042e0 |
|
|
Packit Service |
8042e0 |
#endif /* _ELF_MACHINE_SYM_NO_MATCH_H */
|