glibc/scripts
Florian Weimer 6f85dbf102 Detect ld.so and libc.so version inconsistency during startup
The files NEWS, include/link.h, and sysdeps/generic/ldsodefs.h
contribute to the version fingerprint used for detection.  The
fingerprint can be further refined using the --with-extra-version-id
configure argument.

_dl_call_libc_early_init is replaced with _dl_lookup_libc_early_init.
The new function is used store a pointer to libc.so's
__libc_early_init function in the libc_map_early_init member of the
ld.so namespace structure.  This function pointer can then be called
directly, so the separate invocation function is no longer needed.

The versioned symbol lookup needs the symbol versioning data
structures, so the initialization of libc_map and libc_map_early_init
is now done from _dl_check_map_versions, after this information
becomes available.  (_dl_map_object_from_fd does not set this up
in time, so the initialization code had to be moved from there.)
This means that the separate initialization code can be removed from
dl_main because _dl_check_map_versions covers all maps, including
the initial executable loaded by the kernel.  The lookup still happens
before relocation and the invocation of IFUNC resolvers, so IFUNC
resolvers are protected from ABI mismatch.

The __libc_early_init function pointer is not protected because
so little code runs between the pointer write and the invocation
(only dynamic linker code and IFUNC resolvers).

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2022-08-24 17:35:57 +02:00
..
abi-versions.awk Remove bitrotten --enable-oldest-abi (bug 6652). 2014-09-16 17:45:03 +00:00
abilist.awk Add GLIBC_ABI_DT_RELR for DT_RELR support 2022-04-26 10:16:11 -07:00
backport-support.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
build-many-glibcs.py Use binutils 2.39 branch in build-many-glibcs.py 2022-08-18 13:16:56 +00:00
check-c++-types.sh grep: egrep -> grep -E, fgrep -> grep -F 2022-06-05 12:09:02 -07:00
check-execstack.awk check-execstack: Permit sysdeps to xfail some libs 2018-07-20 03:28:14 +02:00
check-initfini.awk Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-installed-headers.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-local-headers.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-localplt.awk Extend local PLT reference check 2015-07-29 11:58:06 -07:00
check-obsolete-constructs.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-textrel.awk Do check-textrel test using readelf rather than a build-time C program. 2012-05-01 13:27:11 -07:00
check-wrapper-headers.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-wx-segment.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
config-uname.sh Rejigger header generation for default uname implementation. 2010-08-24 11:56:52 -07:00
config.guess Update scripts/config.* files from upstream GNU config version 2022-07-19 09:32:19 -03:00
config.sub Update scripts/config.* files from upstream GNU config version 2022-07-19 09:32:19 -03:00
cpp Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
cross-test-ssh.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
documented.sh grep: egrep -> grep -E, fgrep -> grep -F 2022-06-05 12:09:02 -07:00
dso-ordering-test.py scripts/dso-ordering-test.py: Fix C&P error in * callrefs processing 2022-03-18 18:18:45 +01:00
evaluate-test.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
firstversions.awk Fix bug in firstversions.awk version range handling. 2012-01-28 12:02:44 -05:00
gen-as-const.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
gen-libc-abis Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
gen-libc-modules.awk Auto-generate libc-modules.h 2014-11-19 12:16:00 +05:30
gen-posix-conf-vars.awk Remove uses of sprintf in gen-posix-conf-vars.awk 2015-01-02 11:16:35 +05:30
gen-rrtypes.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
gen-sorted.awk Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
gen-tunables.awk elf: Avoid RELATIVE relocs in __tunables_init 2021-01-21 14:05:15 +00:00
glibc_shared_code.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
glibcelf.py scripts/glibcelf.py: Add hashing support 2022-08-23 19:33:38 +02:00
glibcextract.py glibcextract.py: Add compile_c_snippet 2022-08-12 09:15:03 -03:00
glibcsymbols.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
haveversions.awk Don't build libnsl for new ABIs 2018-09-24 10:23:10 +02:00
install-sh Update miscellaneous files from upstream sources. 2018-12-06 17:21:47 +00:00
lib-names.awk Clean up gnu/lib-names.h generation (bug 14171). 2014-09-26 17:33:04 +00:00
libc_early_init_name.py Detect ld.so and libc.so version inconsistency during startup 2022-08-24 17:35:57 +02:00
list-fixed-bugs.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
list-sources.sh Update scripts/list-sources.sh for ports repository merge. 2014-06-26 21:30:07 +00:00
localplt.awk Support PLT and GOT references in local PIC check 2015-10-14 06:00:02 -07:00
merge-test-results.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
mkinstalldirs Update miscellaneous files from upstream sources. 2018-12-06 17:21:47 +00:00
move-if-change Sync move-if-change from Gnulib, updating copyright 2022-01-01 11:42:26 -08:00
move-symbol-to-libc.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
pylint Implement benchmarking script in python 2014-03-21 17:32:50 +05:30
pylintrc pylintrc: disable reports 2015-11-11 13:41:57 -05:00
rellns-sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
soversions.awk Remove bitrotten --enable-oldest-abi (bug 6652). 2014-09-16 17:45:03 +00:00
sysd-rules.awk sysd-rules: Cut down the number of rtld-% pattern rules 2016-09-20 10:41:05 +02:00
test-installation.pl Update copyright dates not handled by scripts/update-copyrights. 2022-01-01 11:42:26 -08:00
test_printers_common.py Disable debuginfod in printer tests [BZ #28757] 2022-01-14 05:07:29 -08:00
test_printers_exceptions.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-elf-edit.py csu: Implement and use _dl_early_allocate during static startup 2022-05-16 18:42:03 +02:00
tst-ld-trace.py elf: Fix DFS sorting algorithm for LD_TRACE_LOADED_OBJECTS with missing libraries (BZ #28868) 2022-04-27 08:36:09 -03:00
update-abilist.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
update-copyrights Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
vcstocl_quirks.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
versionlist.awk Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
versions.awk Add GLIBC_ABI_DT_RELR for DT_RELR support 2022-04-26 10:16:11 -07:00