[Midnightbsd-cvs] src [12386] trunk/sys/sys/linker.h: Sync with FreeBSD 11-stable
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Feb 16 17:43:24 EST 2020
Revision: 12386
http://svnweb.midnightbsd.org/src/?rev=12386
Author: laffer1
Date: 2020-02-16 17:43:24 -0500 (Sun, 16 Feb 2020)
Log Message:
-----------
Sync with FreeBSD 11-stable
Modified Paths:
--------------
trunk/sys/sys/linker.h
Modified: trunk/sys/sys/linker.h
===================================================================
--- trunk/sys/sys/linker.h 2020-02-16 22:42:27 UTC (rev 12385)
+++ trunk/sys/sys/linker.h 2020-02-16 22:43:24 UTC (rev 12386)
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: stable/10/sys/sys/linker.h 300060 2016-05-17 15:18:01Z pfg $
+ * $FreeBSD: stable/11/sys/sys/linker.h 338867 2018-09-21 20:40:37Z markj $
*/
#ifndef _SYS_LINKER_H_
@@ -80,6 +80,8 @@
int id; /* unique id */
caddr_t address; /* load address */
size_t size; /* size of file */
+ caddr_t ctors_addr; /* address of .ctors */
+ size_t ctors_size; /* size of .ctors */
int ndeps; /* number of dependencies */
linker_file_t* deps; /* list of dependencies */
STAILQ_HEAD(, common_symbol) common; /* list of common symbols */
@@ -141,7 +143,7 @@
* Lookup a symbol in a file. If deps is TRUE, look in dependencies
* if not found in file.
*/
-caddr_t linker_file_lookup_symbol(linker_file_t _file, const char* _name,
+caddr_t linker_file_lookup_symbol(linker_file_t _file, const char* _name,
int _deps);
/*
@@ -155,7 +157,7 @@
/*
* List all functions in a file.
*/
-int linker_file_function_listall(linker_file_t,
+int linker_file_function_listall(linker_file_t,
linker_function_nameval_callback_t, void *);
/*
@@ -212,6 +214,10 @@
#define MODINFOMD_KERNEND 0x0008 /* kernend */
#endif
#define MODINFOMD_SHDR 0x0009 /* section header table */
+#define MODINFOMD_CTORS_ADDR 0x000a /* address of .ctors */
+#define MODINFOMD_CTORS_SIZE 0x000b /* size of .ctors */
+#define MODINFOMD_FW_HANDLE 0x000c /* Firmware dependent handle */
+#define MODINFOMD_KEYBUF 0x000d /* Crypto key intake buffer */
#define MODINFOMD_NOCOPY 0x8000 /* don't copy this metadata to the kernel */
#define MODINFOMD_DEPLIST (0x4001 | MODINFOMD_NOCOPY) /* depends on */
@@ -225,6 +231,7 @@
#endif
#define LINKER_HINTS_VERSION 1 /* linker.hints file version */
+#define LINKER_HINTS_MAX (1 << 20) /* Allow at most 1MB for linker.hints */
#ifdef _KERNEL
@@ -263,11 +270,15 @@
typedef int elf_lookup_fn(linker_file_t, Elf_Size, int, Elf_Addr *);
/* Support functions */
-int elf_reloc(linker_file_t _lf, Elf_Addr base, const void *_rel, int _type, elf_lookup_fn _lu);
-int elf_reloc_local(linker_file_t _lf, Elf_Addr base, const void *_rel, int _type, elf_lookup_fn _lu);
+bool elf_is_ifunc_reloc(Elf_Size r_info);
+int elf_reloc(linker_file_t _lf, Elf_Addr base, const void *_rel,
+ int _type, elf_lookup_fn _lu);
+int elf_reloc_local(linker_file_t _lf, Elf_Addr base, const void *_rel,
+ int _type, elf_lookup_fn _lu);
Elf_Addr elf_relocaddr(linker_file_t _lf, Elf_Addr addr);
const Elf_Sym *elf_get_sym(linker_file_t _lf, Elf_Size _symidx);
const char *elf_get_symname(linker_file_t _lf, Elf_Size _symidx);
+void link_elf_ireloc(caddr_t kmdp);
typedef struct linker_ctf {
const uint8_t *ctftab; /* Decompressed CTF data. */
More information about the Midnightbsd-cvs
mailing list