mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
03dca99e20
Mark die() as a function which accepts printf-style arguments so that the compiler can typecheck them against the supplied format string. Use the C99 inttypes.h format specifiers as relocs.c gets built for both 32- and 64-bit. Original version of the patch by Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: http://lkml.kernel.org/r/YNnb6Q4QHtNYC049@zn.tnic
40 lines
862 B
C
40 lines
862 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef RELOCS_H
|
|
#define RELOCS_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdarg.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <inttypes.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include <unistd.h>
|
|
#include <elf.h>
|
|
#include <byteswap.h>
|
|
#define USE_BSD
|
|
#include <endian.h>
|
|
#include <regex.h>
|
|
#include <tools/le_byteshift.h>
|
|
|
|
__attribute__((__format__(printf, 1, 2)))
|
|
void die(char *fmt, ...) __attribute__((noreturn));
|
|
|
|
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
|
|
|
enum symtype {
|
|
S_ABS,
|
|
S_REL,
|
|
S_SEG,
|
|
S_LIN,
|
|
S_NSYMTYPES
|
|
};
|
|
|
|
void process_32(FILE *fp, int use_real_mode, int as_text,
|
|
int show_absolute_syms, int show_absolute_relocs,
|
|
int show_reloc_info);
|
|
void process_64(FILE *fp, int use_real_mode, int as_text,
|
|
int show_absolute_syms, int show_absolute_relocs,
|
|
int show_reloc_info);
|
|
#endif /* RELOCS_H */
|