// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2015 Imagination Technologies * Author: Alex Smith <alex.smith@imgtec.com>
*/
/* * This tool is used to generate the real VDSO images from the raw image. It * first patches up the MIPS ABI flags and GNU attributes sections defined in * elf.S to have the correct name and type. It then generates a C source file * to be compiled into the kernel containing the VDSO image data and a * mips_vdso_image struct for it, including symbol offsets extracted from the * image. * * We need to be passed both a stripped and unstripped VDSO image. The stripped * image is compiled into the kernel, but we must also patch up the unstripped * image's ABI flags sections so that it can be installed and used for * debugging.
*/
/* Define these in case the system elf.h is not new enough to have them. */ #ifndef SHT_GNU_ATTRIBUTES # define SHT_GNU_ATTRIBUTES 0x6ffffff5 #endif #ifndef SHT_MIPS_ABIFLAGS # define SHT_MIPS_ABIFLAGS 0x7000002a #endif
dbg_vdso = map_vdso(dbg_vdso_path, &dbg_vdso_size); if (!dbg_vdso) return EXIT_FAILURE;
vdso = map_vdso(vdso_path, &vdso_size); if (!vdso) return EXIT_FAILURE;
/* Patch both the VDSOs' ABI flags sections. */ if (!patch_vdso(dbg_vdso_path, dbg_vdso)) return EXIT_FAILURE; if (!patch_vdso(vdso_path, vdso)) return EXIT_FAILURE;
/* Calculate and write symbol offsets to <output file> */ if (!get_symbols(dbg_vdso_path, dbg_vdso)) {
unlink(out_path);
fclose(out_file); return EXIT_FAILURE;
}
fprintf(out_file, "};\n");
fclose(out_file);
return EXIT_SUCCESS;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.