mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
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.
This commit is contained in:
parent
e69897bf20
commit
4a306ef1c8
@ -1,3 +1,12 @@
|
||||
2017-11-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2017-11-12 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
timezone: pacify GCC -Wstringop-truncation
|
||||
|
@ -126,6 +126,7 @@ int _dl_starting_up = 1;
|
||||
void *_dl_random;
|
||||
|
||||
/* Get architecture specific initializer. */
|
||||
#include <dl-procruntime.c>
|
||||
#include <dl-procinfo.c>
|
||||
|
||||
/* Initial value of the CPU clock. */
|
||||
|
@ -203,6 +203,8 @@ struct link_map
|
||||
freed, ie. not allocated with
|
||||
the dummy malloc in ld.so. */
|
||||
|
||||
#include <link_map.h>
|
||||
|
||||
/* Collected information about own RPATH directories. */
|
||||
struct r_search_path_struct l_rpath_dirs;
|
||||
|
||||
|
1
sysdeps/generic/dl-procruntime.c
Normal file
1
sysdeps/generic/dl-procruntime.c
Normal file
@ -0,0 +1 @@
|
||||
/* No architecture specific definitions. */
|
@ -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. */
|
||||
|
1
sysdeps/generic/link_map.h
Normal file
1
sysdeps/generic/link_map.h
Normal file
@ -0,0 +1 @@
|
||||
/* No architecture specific definitions. */
|
Loading…
Reference in New Issue
Block a user