diff --git a/glibc-ld-readonly-revert.patch b/glibc-ld-readonly-revert.patch index 7c2bbf6..b53fdd0 100644 --- a/glibc-ld-readonly-revert.patch +++ b/glibc-ld-readonly-revert.patch @@ -1,6 +1,9 @@ Revert "ld.so: Replace DL_RO_DYN_SECTION with dl_relocate_ld [BZ #28340]" -This reverts commit b413280cfb16834450f66f554bc0d618bb513851. +This reverts commit b413280cfb16834450f66f554bc0d618bb513851 with changes to +adjust for the following subsequent commits: +490e6c62aa31a8 (elf: Avoid nested functions in the loader [BZ #27220]) +4af6982e4c9fc4 (elf: Fix elf_get_dynamic_info definition) It does not work on ppc64le: @@ -30,7 +33,7 @@ DONT_USE_BOOTSTRAP_MAP). diff --git a/elf/Makefile b/elf/Makefile -index 0cdccaacb3ca71c5..835b85bd7ce394c1 100644 +index 26986c0692..2236b6ec62 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -224,7 +224,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \ @@ -51,7 +54,7 @@ index 0cdccaacb3ca71c5..835b85bd7ce394c1 100644 # Most modules build with _ISOMAC defined, but those filtered out # depend on internal headers. -@@ -1911,10 +1911,3 @@ $(objpfx)tst-getauxval-static.out: $(objpfx)tst-auxvalmod.so +@@ -1912,10 +1912,3 @@ $(objpfx)tst-getauxval-static.out: $(objpfx)tst-auxvalmod.so tst-getauxval-static-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx) $(objpfx)tst-dlmopen-gethostbyname.out: $(objpfx)tst-dlmopen-gethostbyname-mod.so @@ -63,10 +66,10 @@ index 0cdccaacb3ca71c5..835b85bd7ce394c1 100644 - -Wl,--script=tst-ro-dynamic-mod.map \ - $(objpfx)tst-ro-dynamic-mod.os diff --git a/elf/dl-load.c b/elf/dl-load.c -index 6ea71077afc2852c..39e0d074b4a0ab7b 100644 +index 335c79fad5..a8e7f2e9cb 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c -@@ -1149,7 +1149,6 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, +@@ -1154,7 +1154,6 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, such a segment to avoid a crash later. */ l->l_ld = (void *) ph->p_vaddr; l->l_ldnum = ph->p_memsz / sizeof (ElfW(Dyn)); @@ -74,20 +77,20 @@ index 6ea71077afc2852c..39e0d074b4a0ab7b 100644 } break; -@@ -1293,7 +1292,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, +@@ -1298,7 +1297,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, else l->l_ld = (ElfW(Dyn) *) ((ElfW(Addr)) l->l_ld + l->l_addr); -- elf_get_dynamic_info (l); -+ elf_get_dynamic_info (l, NULL); +- elf_get_dynamic_info (l, false); ++ elf_get_dynamic_info (l, NULL, false); /* Make sure we are not dlopen'ing an object that has the DF_1_NOOPEN flag set, or a PIE object. */ diff --git a/elf/dl-reloc-static-pie.c b/elf/dl-reloc-static-pie.c -index 68ded176cd2db1a9..289651b3414284d2 100644 +index 8a99c4995b..efffc411cd 100644 --- a/elf/dl-reloc-static-pie.c +++ b/elf/dl-reloc-static-pie.c -@@ -40,17 +40,7 @@ _dl_relocate_static_pie (void) +@@ -42,17 +42,7 @@ _dl_relocate_static_pie (void) /* Read our own dynamic section and fill in the info array. */ main_map->l_ld = ((void *) main_map->l_addr + elf_machine_dynamic ()); @@ -101,25 +104,25 @@ index 68ded176cd2db1a9..289651b3414284d2 100644 - break; - } - -- elf_get_dynamic_info (main_map); -+ elf_get_dynamic_info (main_map, NULL); +- elf_get_dynamic_info (main_map, false); ++ elf_get_dynamic_info (main_map, NULL, false); # ifdef ELF_MACHINE_BEFORE_RTLD_RELOC - ELF_MACHINE_BEFORE_RTLD_RELOC (main_map->l_info); + ELF_MACHINE_BEFORE_RTLD_RELOC (main_map, main_map->l_info); diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h -index 4aa2058abf6443c9..d8ec32377d37635c 100644 +index d169099fbc..061466af71 100644 --- a/elf/get-dynamic-info.h +++ b/elf/get-dynamic-info.h -@@ -28,7 +28,7 @@ static - auto - #endif - inline void __attribute__ ((unused, always_inline)) --elf_get_dynamic_info (struct link_map *l) -+elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) +@@ -25,7 +25,7 @@ + #include + + static inline void __attribute__ ((unused, always_inline)) +-elf_get_dynamic_info (struct link_map *l, bool check) ++elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp, bool check) { #if __ELF_NATIVE_CLASS == 32 typedef Elf32_Word d_tag_utype; -@@ -69,15 +69,28 @@ elf_get_dynamic_info (struct link_map *l) +@@ -66,15 +66,28 @@ elf_get_dynamic_info (struct link_map *l, bool check) info[i] = dyn; } @@ -150,7 +153,7 @@ index 4aa2058abf6443c9..d8ec32377d37635c 100644 while (0) ADJUST_DYN_INFO (DT_HASH); -@@ -94,7 +107,9 @@ elf_get_dynamic_info (struct link_map *l) +@@ -91,7 +104,9 @@ elf_get_dynamic_info (struct link_map *l, bool check) ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM)); ADJUST_DYN_INFO (ADDRIDX (DT_GNU_HASH)); # undef ADJUST_DYN_INFO @@ -161,10 +164,10 @@ index 4aa2058abf6443c9..d8ec32377d37635c 100644 { #if ELF_MACHINE_NO_RELA diff --git a/elf/rtld.c b/elf/rtld.c -index 8d2bba3d43f0a828..742c413c48d4930b 100644 +index fe5ee9ec4d..de731a90d9 100644 --- a/elf/rtld.c +++ b/elf/rtld.c -@@ -463,7 +463,6 @@ _dl_start_final (void *arg, struct dl_start_final_info *info) +@@ -464,7 +464,6 @@ _dl_start_final (void *arg, struct dl_start_final_info *info) #ifndef DONT_USE_BOOTSTRAP_MAP GL(dl_rtld_map).l_addr = info->l.l_addr; GL(dl_rtld_map).l_ld = info->l.l_ld; @@ -172,16 +175,16 @@ index 8d2bba3d43f0a828..742c413c48d4930b 100644 memcpy (GL(dl_rtld_map).l_info, info->l.l_info, sizeof GL(dl_rtld_map).l_info); GL(dl_rtld_map).l_mach = info->l.l_mach; -@@ -547,7 +546,7 @@ _dl_start (void *arg) +@@ -548,7 +547,7 @@ _dl_start (void *arg) /* Read our own dynamic section and fill in the info array. */ bootstrap_map.l_ld = (void *) bootstrap_map.l_addr + elf_machine_dynamic (); -- elf_get_dynamic_info (&bootstrap_map); -+ elf_get_dynamic_info (&bootstrap_map, NULL); +- elf_get_dynamic_info (&bootstrap_map, true); ++ elf_get_dynamic_info (&bootstrap_map, NULL, true); #if NO_TLS_OFFSET != 0 bootstrap_map.l_tls_offset = NO_TLS_OFFSET; -@@ -1469,7 +1468,6 @@ dl_main (const ElfW(Phdr) *phdr, +@@ -1470,7 +1469,6 @@ dl_main (const ElfW(Phdr) *phdr, /* This tells us where to find the dynamic section, which tells us everything we need to do. */ main_map->l_ld = (void *) main_map->l_addr + ph->p_vaddr; @@ -189,17 +192,17 @@ index 8d2bba3d43f0a828..742c413c48d4930b 100644 break; case PT_INTERP: /* This "interpreter segment" was used by the program loader to -@@ -1615,7 +1613,7 @@ dl_main (const ElfW(Phdr) *phdr, +@@ -1616,7 +1614,7 @@ dl_main (const ElfW(Phdr) *phdr, if (! rtld_is_main) { /* Extract the contents of the dynamic section for easy access. */ -- elf_get_dynamic_info (main_map); -+ elf_get_dynamic_info (main_map, NULL); +- elf_get_dynamic_info (main_map, false); ++ elf_get_dynamic_info (main_map, NULL, false); /* If the main map is libc.so, update the base namespace to refer to this map. If libc.so is loaded later, this happens diff --git a/elf/setup-vdso.h b/elf/setup-vdso.h -index f44748bc9858e5fd..86c491e49c98345d 100644 +index 6fdffafcca..97de0f56a0 100644 --- a/elf/setup-vdso.h +++ b/elf/setup-vdso.h @@ -33,6 +33,8 @@ setup_vdso (struct link_map *main_map __attribute__ ((unused)), @@ -223,14 +226,14 @@ index f44748bc9858e5fd..86c491e49c98345d 100644 l->l_map_end += l->l_addr; l->l_text_end += l->l_addr; l->l_ld = (void *) ((ElfW(Addr)) l->l_ld + l->l_addr); -- elf_get_dynamic_info (l); -+ elf_get_dynamic_info (l, dyn_temp); +- elf_get_dynamic_info (l, false); ++ elf_get_dynamic_info (l, dyn_temp, false); _dl_setup_hash (l); l->l_relocated = 1; diff --git a/elf/tst-ro-dynamic-mod.c b/elf/tst-ro-dynamic-mod.c deleted file mode 100644 -index 6d99925964c50caf..0000000000000000 +index 6d99925964..0000000000 --- a/elf/tst-ro-dynamic-mod.c +++ /dev/null @@ -1,19 +0,0 @@ @@ -255,7 +258,7 @@ index 6d99925964c50caf..0000000000000000 -int foo = -1; diff --git a/elf/tst-ro-dynamic-mod.map b/elf/tst-ro-dynamic-mod.map deleted file mode 100644 -index 2fe4a2998cddd587..0000000000000000 +index 2fe4a2998c..0000000000 --- a/elf/tst-ro-dynamic-mod.map +++ /dev/null @@ -1,16 +0,0 @@ @@ -277,7 +280,7 @@ index 2fe4a2998cddd587..0000000000000000 -} diff --git a/elf/tst-ro-dynamic.c b/elf/tst-ro-dynamic.c deleted file mode 100644 -index 3a18f8789ad386bb..0000000000000000 +index 3a18f8789a..0000000000 --- a/elf/tst-ro-dynamic.c +++ /dev/null @@ -1,31 +0,0 @@ @@ -313,7 +316,7 @@ index 3a18f8789ad386bb..0000000000000000 - -#include diff --git a/include/link.h b/include/link.h -index 484ee6cb1bc6e298..7b8250db36ebfcee 100644 +index 484ee6cb1b..7b8250db36 100644 --- a/include/link.h +++ b/include/link.h @@ -205,7 +205,6 @@ struct link_map @@ -335,7 +338,7 @@ index 484ee6cb1bc6e298..7b8250db36ebfcee 100644 it is allocated separately. See link_map_audit_state in diff --git a/sysdeps/generic/dl-relocate-ld.h b/sysdeps/generic/dl-relocate-ld.h deleted file mode 100644 -index 5fae206db9941e97..0000000000000000 +index 5fae206db9..0000000000 --- a/sysdeps/generic/dl-relocate-ld.h +++ /dev/null @@ -1,32 +0,0 @@ @@ -372,7 +375,7 @@ index 5fae206db9941e97..0000000000000000 - -#endif /* _DL_RELOCATE_LD_H */ diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h -index d49529da0db59f8b..6e50fcd7cd9a18d6 100644 +index 9ec1511bb0..637dfcc1e5 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -75,8 +75,11 @@ __BEGIN_DECLS @@ -391,7 +394,7 @@ index d49529da0db59f8b..6e50fcd7cd9a18d6 100644 typedef struct link_map *lookup_t; diff --git a/sysdeps/mips/dl-relocate-ld.h b/sysdeps/mips/dl-relocate-ld.h deleted file mode 100644 -index 0c18d9a567cad54f..0000000000000000 +index 0c18d9a567..0000000000 --- a/sysdeps/mips/dl-relocate-ld.h +++ /dev/null @@ -1,32 +0,0 @@ @@ -428,7 +431,7 @@ index 0c18d9a567cad54f..0000000000000000 - -#endif /* _DL_RELOCATE_LD_H */ diff --git a/sysdeps/mips/ldsodefs.h b/sysdeps/mips/ldsodefs.h -index 36fd09a8bdb4cacf..4db7c60e38e42ef2 100644 +index 36fd09a8bd..4db7c60e38 100644 --- a/sysdeps/mips/ldsodefs.h +++ b/sysdeps/mips/ldsodefs.h @@ -75,6 +75,10 @@ struct La_mips_64_retval; @@ -444,7 +447,7 @@ index 36fd09a8bdb4cacf..4db7c60e38e42ef2 100644 /* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each diff --git a/sysdeps/riscv/dl-relocate-ld.h b/sysdeps/riscv/dl-relocate-ld.h deleted file mode 100644 -index 10327454b17a7097..0000000000000000 +index 10327454b1..0000000000 --- a/sysdeps/riscv/dl-relocate-ld.h +++ /dev/null @@ -1,32 +0,0 @@ @@ -481,7 +484,7 @@ index 10327454b17a7097..0000000000000000 - -#endif /* _DL_RELOCATE_LD_H */ diff --git a/sysdeps/riscv/ldsodefs.h b/sysdeps/riscv/ldsodefs.h -index 8947ffe4b5026a2e..0c696714a7a93cff 100644 +index 8947ffe4b5..0c696714a7 100644 --- a/sysdeps/riscv/ldsodefs.h +++ b/sysdeps/riscv/ldsodefs.h @@ -38,6 +38,11 @@ struct La_riscv_retval; @@ -496,3 +499,6 @@ index 8947ffe4b5026a2e..0c696714a7a93cff 100644 #include_next #endif +-- +2.31.1 + diff --git a/glibc.spec b/glibc.spec index 030e245..172b133 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.34.9000-176-gf2e06656d0 +%define glibcsrcdir glibc-2.34.9000-195-ge59ced2384 %define glibcversion 2.34.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -151,7 +151,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 13%{?dist} +Release: 14%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2261,6 +2261,30 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Oct 14 2021 Arjun Shankar - 2.34.9000-14 +- Adjust glibc-ld-readonly-revert.patch. +- Auto-sync with upstream branch master, + commit e59ced238482fd71f3e493717f14f6507346741e: +- x86: Optimize memset-vec-unaligned-erms.S +- x86: Optimize memcmp-evex-movbe.S for frontend behavior and size +- libio: Update tst-wfile-sync to not depend on stdin +- elf: Update audit tests to not depend on stdout +- elf: Fix elf_get_dynamic_info definition +- Add TEST_COMPARE_STRING_WIDE to support/check.h +- Fix nios2 localplt failure +- elf: Remove Intel MPX support (lazy PLT, ld.so profile, and LD_AUDIT) +- resolv: Avoid GCC 12 false positive warning [BZ #28439]. +- benchtests: Add medium cases and increase iters in bench-memset.c +- x86: Modify ENTRY in sysdep.h so that p2align can be specified +- resolv: make res_randomid use random_bits() +- Linux: implement getloadavg(3) using sysinfo(2) +- Remove unreliable parts of rt/tst-cpuclock2 +- elf: Avoid nested functions in the loader [BZ #27220] +- Add run-time check for indirect external access +- Initial support for GNU_PROPERTY_1_NEEDED +- io: Fix ftw internal realloc buffer (BZ #28126) +- Fix subscript error with odd TZif file [BZ #28338] + * Thu Oct 07 2021 Carlos O'Donell - 2.34.9000-13 - Auto-sync with upstream branch master, commit f2e06656d04a9fcb0603802a4f8ce7aa3a1f055e: