Blame sysdeps/generic/ldconfig.h

Packit 6c4009
/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
   Contributed by Andreas Jaeger <aj@suse.de>, 1999.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _LDCONFIG_H
Packit 6c4009
#define _LDCONFIG_H
Packit 6c4009
Packit Service 2cd7cc
#include <stddef.h>
Packit 6c4009
#include <stdint.h>
Packit Service 2cd7cc
#include <sys/stat.h>
Packit 6c4009
Packit 6c4009
#define FLAG_ANY			-1
Packit 6c4009
#define FLAG_TYPE_MASK			0x00ff
Packit 6c4009
#define FLAG_LIBC4			0x0000
Packit 6c4009
#define FLAG_ELF			0x0001
Packit 6c4009
#define FLAG_ELF_LIBC5			0x0002
Packit 6c4009
#define FLAG_ELF_LIBC6			0x0003
Packit 6c4009
#define FLAG_REQUIRED_MASK		0xff00
Packit 6c4009
#define FLAG_SPARC_LIB64		0x0100
Packit 6c4009
#define FLAG_IA64_LIB64			0x0200
Packit 6c4009
#define FLAG_X8664_LIB64		0x0300
Packit 6c4009
#define FLAG_S390_LIB64			0x0400
Packit 6c4009
#define FLAG_POWERPC_LIB64		0x0500
Packit 6c4009
#define FLAG_MIPS64_LIBN32		0x0600
Packit 6c4009
#define FLAG_MIPS64_LIBN64		0x0700
Packit 6c4009
#define FLAG_X8664_LIBX32		0x0800
Packit 6c4009
#define FLAG_ARM_LIBHF			0x0900
Packit 6c4009
#define FLAG_AARCH64_LIB64		0x0a00
Packit 6c4009
#define FLAG_ARM_LIBSF			0x0b00
Packit 6c4009
#define FLAG_MIPS_LIB32_NAN2008		0x0c00
Packit 6c4009
#define FLAG_MIPS64_LIBN32_NAN2008	0x0d00
Packit 6c4009
#define FLAG_MIPS64_LIBN64_NAN2008	0x0e00
Packit 6c4009
#define FLAG_RISCV_FLOAT_ABI_SOFT	0x0f00
Packit 6c4009
#define FLAG_RISCV_FLOAT_ABI_DOUBLE	0x1000
Packit 6c4009
Packit 6c4009
/* Name of auxiliary cache.  */
Packit 6c4009
#define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
Packit 6c4009
Packit 6c4009
/* Declared in cache.c.  */
Packit 6c4009
extern void print_cache (const char *cache_name);
Packit 6c4009
Packit 6c4009
extern void init_cache (void);
Packit 6c4009
Packit 6c4009
extern void save_cache (const char *cache_name);
Packit 6c4009
Packit Service 273477
struct glibc_hwcaps_subdirectory;
Packit Service 273477
Packit Service 273477
/* Return a struct describing the subdirectory for NAME.  Reuse an
Packit Service 273477
   existing struct if it exists.  */
Packit Service 273477
struct glibc_hwcaps_subdirectory *new_glibc_hwcaps_subdirectory
Packit Service 273477
  (const char *name);
Packit Service 273477
Packit Service 273477
/* Returns the name that was specified when
Packit Service 273477
   add_glibc_hwcaps_subdirectory was called.  */
Packit Service 273477
const char *glibc_hwcaps_subdirectory_name
Packit Service 273477
  (const struct glibc_hwcaps_subdirectory *);
Packit Service 273477
Packit Service 273477
extern void add_to_cache (const char *path, const char *filename,
Packit Service 273477
			  const char *soname,
Packit Service 273477
			  int flags, unsigned int osversion, uint64_t hwcap,
Packit Service 273477
			  struct glibc_hwcaps_subdirectory *);
Packit 6c4009
Packit 6c4009
extern void init_aux_cache (void);
Packit 6c4009
Packit 6c4009
extern void load_aux_cache (const char *aux_cache_name);
Packit 6c4009
Packit 6c4009
extern int search_aux_cache (struct stat64 *stat_buf, int *flags,
Packit 6c4009
			     unsigned int *osversion, char **soname);
Packit 6c4009
Packit 6c4009
extern void add_to_aux_cache (struct stat64 *stat_buf, int flags,
Packit 6c4009
			      unsigned int osversion, const char *soname);
Packit 6c4009
Packit 6c4009
extern void save_aux_cache (const char *aux_cache_name);
Packit 6c4009
Packit 6c4009
/* Declared in readlib.c.  */
Packit 6c4009
extern int process_file (const char *real_file_name, const char *file_name,
Packit 6c4009
			 const char *lib, int *flag, unsigned int *osversion,
Packit 6c4009
			 char **soname, int is_link, struct stat64 *stat_buf);
Packit 6c4009
Packit 6c4009
extern char *implicit_soname (const char *lib, int flag);
Packit 6c4009
Packit 6c4009
/* Declared in readelflib.c.  */
Packit 6c4009
extern int process_elf_file (const char *file_name, const char *lib, int *flag,
Packit 6c4009
			     unsigned int *osversion, char **soname,
Packit 6c4009
			     void *file_contents, size_t file_length);
Packit 6c4009
Packit 6c4009
/* Declared in chroot_canon.c.  */
Packit 6c4009
extern char *chroot_canon (const char *chroot, const char *name);
Packit 6c4009
Packit 6c4009
/* Declared in ldconfig.c.  */
Packit 6c4009
extern int opt_verbose;
Packit 6c4009
Packit Service 5047bc
enum opt_format
Packit Service 5047bc
  {
Packit Service 5047bc
    opt_format_old = 0,	/* Use struct cache_file.  */
Packit Service 5047bc
    opt_format_compat = 1, /* Use both, old format followed by new.  */
Packit Service 5047bc
    opt_format_new = 2,	/* Use struct cache_file_new.  */
Packit Service 5047bc
  };
Packit Service 5047bc
Packit Service 5047bc
extern enum opt_format opt_format;
Packit 6c4009
Packit 6c4009
/* Prototypes for a few program-wide used functions.  */
Packit 6c4009
#include <programs/xmalloc.h>
Packit 6c4009
Packit 6c4009
#endif /* ! _LDCONFIG_H  */