mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
linux: Constify rfv variable in dl_vdso_vsym
Compilers may decide to put the rfv variable in .data rather than on the stack. It's slightly better to put it in .data.rel.ro.local instead. Regardles of that, making it const may enable further optimisations. Found when examining relative relocations (GOT ones in particular) as part of enabling static-pie for PowerPC64.
This commit is contained in:
parent
c0efbf8920
commit
30afd8c44d
@ -45,7 +45,7 @@ dl_vdso_vsym (const char *name)
|
||||
ElfW (Sym) wsym = { 0 };
|
||||
wsym.st_info = (unsigned char) ELFW (ST_INFO (STB_WEAK, STT_NOTYPE));
|
||||
|
||||
struct r_found_version rfv = { VDSO_NAME, VDSO_HASH, 1, NULL };
|
||||
const struct r_found_version rfv = { VDSO_NAME, VDSO_HASH, 1, NULL };
|
||||
|
||||
/* Search the scope of the vdso map. */
|
||||
const ElfW (Sym) *ref = &wsym;
|
||||
|
Loading…
Reference in New Issue
Block a user