diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-11-13 08:02:39 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-11-13 08:02:52 -0800 |
commit | 4a306ef1c8ff1cac292c2fd56a3b91d7bfdecefc (patch) | |
tree | 48c4360f23ee98ce4355b932ba66b4c1226de0a7 /sysdeps/generic | |
parent | e69897bf202e18034cbef26f363bae64de70a196 (diff) | |
download | glibc-4a306ef1c8ff1cac292c2fd56a3b91d7bfdecefc.tar.gz glibc-4a306ef1c8ff1cac292c2fd56a3b91d7bfdecefc.tar.xz glibc-4a306ef1c8ff1cac292c2fd56a3b91d7bfdecefc.zip |
ld.so: Add architecture specific fields
To support Intel Control-flow Enforcement Technology (CET) run-time control: 1. An architecture specific field in the writable ld.so namespace is needed to indicate if CET features are enabled at run-time. 2. An architecture specific field in struct link_map is needed if CET features are enabled in an ELF module. This patch adds dl-procruntime.c to the writable ld.so namespace and link_map.h to struct link_map. Tested with build-many-glibcs.py. * elf/dl-support.c: Include <dl-procruntime.c>. * include/link.h: Include <link_map.h>. * sysdeps/generic/dl-procruntime.c: New file. * sysdeps/generic/link_map.h: Likewise. * sysdeps/generic/ldsodefs.h: Include <dl-procruntime.c> in the writable ld.so namespace.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/dl-procruntime.c | 1 | ||||
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 11 | ||||
-rw-r--r-- | sysdeps/generic/link_map.h | 1 |
3 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/generic/dl-procruntime.c b/sysdeps/generic/dl-procruntime.c new file mode 100644 index 0000000000..a056184690 --- /dev/null +++ b/sysdeps/generic/dl-procruntime.c @@ -0,0 +1 @@ +/* No architecture specific definitions. */ diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 5efae2d96d..52a792a597 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -373,6 +373,13 @@ struct rtld_global EXTERN void (*_dl_rtld_unlock_recursive) (void *); #endif + /* Get architecture specific definitions. */ +#define PROCINFO_DECL +#ifndef PROCINFO_CLASS +# define PROCINFO_CLASS EXTERN +#endif +#include <dl-procruntime.c> + /* If loading a shared object requires that we make the stack executable when it was not, we do it by calling this function. It returns an errno code or zero on success. */ @@ -529,10 +536,6 @@ struct rtld_global_ro #endif /* Get architecture specific definitions. */ -#define PROCINFO_DECL -#ifndef PROCINFO_CLASS -# define PROCINFO_CLASS EXTERN -#endif #include <dl-procinfo.c> /* Names of shared object for which the RPATH should be ignored. */ diff --git a/sysdeps/generic/link_map.h b/sysdeps/generic/link_map.h new file mode 100644 index 0000000000..a056184690 --- /dev/null +++ b/sysdeps/generic/link_map.h @@ -0,0 +1 @@ +/* No architecture specific definitions. */ |