about summary refs log tree commit diff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* scripts/glibcelf.py: Add PT_AARCH64_MEMTAG_MTE constantAdhemerval Zanella2022-06-061-0/+4
| | | | | | | It was added in commit 603e5c8ba7257483c162cabb06eb6f79096429b6. This caused the elf/tst-glibcelf consistency check to fail. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* grep: egrep -> grep -E, fgrep -> grep -FSam James2022-06-052-4/+4
| | | | | | | | | | | Newer versions of GNU grep (after grep 3.7, not inclusive) will warn on 'egrep' and 'fgrep' invocations. Convert usages within the tree to their expanded non-aliased counterparts to avoid irritating warnings during ./configure and the test suite. Signed-off-by: Sam James <sam@gentoo.org> Reviewed-by: Fangrui Song <maskray@google.com>
* Use Linux 5.18 in build-many-glibcs.pyJoseph Myers2022-05-241-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.18. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* scripts/glibcelf.py: Add *T_RISCV_* constantsFlorian Weimer2022-05-161-0/+12
| | | | | | | | | SHT_RISCV_ATTRIBUTES, PT_RISCV_ATTRIBUTES, DT_RISCV_VARIANT_CC were added in commit 0b6c6750732483b4d59c2fcb45484079cd84157d ("Update RISC-V specific ELF definitions"). This caused the elf/tst-glibcelf consistency check to fail. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* csu: Implement and use _dl_early_allocate during static startupFlorian Weimer2022-05-161-7/+27
| | | | | | | | | | | This implements mmap fallback for a brk failure during TLS allocation. scripts/tls-elf-edit.py is updated to support the new patching method. The script no longer requires that in the input object is of ET_DYN type. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf: Fix DFS sorting algorithm for LD_TRACE_LOADED_OBJECTS with missing ↵Adhemerval Zanella2022-04-271-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libraries (BZ #28868) On _dl_map_object the underlying file is not opened in trace mode (in other cases where the underlying file can't be opened, _dl_map_object quits with an error). If there any missing libraries being processed, they will not be considered on final nlist size passed on _dl_sort_maps later in the function. And it is then used by _dl_sort_maps_dfs on the stack allocated working maps: 222 /* Array to hold RPO sorting results, before we copy back to maps[]. */ 223 struct link_map *rpo[nmaps]; 224 225 /* The 'head' position during each DFS iteration. Note that we start at 226 one past the last element due to first-decrement-then-store (see the 227 bottom of above dfs_traversal() routine). */ 228 struct link_map **rpo_head = &rpo[nmaps]; However while transversing the 'l_initfini' on dfs_traversal it will still consider the l_faked maps and thus update rpo more times than the allocated working 'rpo', overflowing the stack object. As suggested in bugzilla, one option would be to avoid sorting the maps for trace mode. However I think ignoring l_faked object does make sense (there is one less constraint to call the sorting function), it allows a slight less stack usage for trace, and it is slight simpler solution. The tests does trigger the stack overflow, however I tried to make it more generic to check different scenarios or missing objects. Checked on x86_64-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Add GLIBC_ABI_DT_RELR for DT_RELR supportH.J. Lu2022-04-262-1/+8
| | | | | | | | | | | | | | | | | | | | The EI_ABIVERSION field of the ELF header in executables and shared libraries can be bumped to indicate the minimum ABI requirement on the dynamic linker. However, EI_ABIVERSION in executables isn't checked by the Linux kernel ELF loader nor the existing dynamic linker. Executables will crash mysteriously if the dynamic linker doesn't support the ABI features required by the EI_ABIVERSION field. The dynamic linker should be changed to check EI_ABIVERSION in executables. Add a glibc version, GLIBC_ABI_DT_RELR, to indicate DT_RELR support so that the existing dynamic linkers will issue an error on executables with GLIBC_ABI_DT_RELR dependency. When there is a DT_VERNEED entry with libc.so on DT_NEEDED, issue an error if there is a DT_RELR entry without GLIBC_ABI_DT_RELR dependency. Support __placeholder_only_for_empty_version_map as the placeholder symbol used only for empty version map to generate GLIBC_ABI_DT_RELR without any symbols.
* elf: Define DT_RELR related macros and typesH.J. Lu2022-04-261-0/+4
|
* scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlierFlorian Weimer2022-04-251-0/+6
| | | | | enum.IntFlag and enum.EnumMeta._missing_ support are not part of earlier Python versions.
* scripts: Add glibcelf.py moduleFlorian Weimer2022-04-221-0/+1135
| | | | | | | | | | | | | | | | Hopefully, this will lead to tests that are easier to maintain. The current approach of parsing readelf -W output using regular expressions is not necessarily easier than parsing the ELF data directly. This module is still somewhat incomplete (e.g., coverage of relocation types and versioning information is missing), but it is sufficient to perform basic symbol analysis or program header analysis. The EM_* mapping for architecture-specific constant classes (e.g., SttX86_64) is not yet implemented. The classes are defined for the benefit of elf/tst-glibcelf.py. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Use Linux 5.17 in build-many-glibcs.pyJoseph Myers2022-03-221-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.17. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* scripts/dso-ordering-test.py: Fix C&P error in * callrefs processingFlorian Weimer2022-03-181-3/+3
| | | | | | | The elf/dso-sort-tests-src subdirectory is not changed by this commit, so it seems that the cut-and-paste error was not material. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use binutils 2.38 branch in build-many-glibcs.pyJoseph Myers2022-02-101-1/+1
| | | | | | This patch makes build-many-glibcs.py use binutils 2.38 branch. Tested with build-many-glibcs.py (compilers and glibcs builds).
* elf: Replace tst-p_alignmod1-editX with a python scriptAdhemerval Zanella2022-01-261-0/+206
| | | | | | | | This avoid the cross-compiling breakage when the test should not run ($(run-built-tests) equal to no). Checked on x86_64-linux-gnu and i686-linux-gnu as well with a cross compile to aarch64-linux-gnu and powerpc64-linux-gnu.
* Disable debuginfod in printer tests [BZ #28757]H.J. Lu2022-01-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | With gdb-11.1-6.fc35.x86_64, I got FAIL: nptl/test-cond-printers FAIL: nptl/test-condattr-printers FAIL: nptl/test-mutex-printers FAIL: nptl/test-mutexattr-printers FAIL: nptl/test-rwlock-printers FAIL: nptl/test-rwlockattr-printers $ cat nptl/test-condattr-printers.out Error: Response does not match the expected pattern. Command: start Expected pattern: main Response: Temporary breakpoint 1 at 0x11d5: file test-condattr-printers.c, line 43. Starting program: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/nptl/test-condattr-printers This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.fedoraproject.org/ Enable debuginfod for this session? (y or [n]) Disable debuginfod to avoid GDB messages. This fixes BZ #28757. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* Use Linux 5.16 in build-many-glibcs.pyJoseph Myers2022-01-111-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.16. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* build-many-glibcs.py: add OpenRISC supportStafford Horne2022-01-051-0/+5
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Sync move-if-change from Gnulib, updating copyrightPaul Eggert2022-01-011-1/+1
|
* Update copyright dates not handled by scripts/update-copyrights.Paul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | I've updated copyright dates in glibc for 2022. This is the patch for the changes not generated by scripts/update-copyrights and subsequent build / regeneration of generated files. As well as the usual annual updates, mainly dates in --version output (minus csu/version.c which previously had to be handled manually but is now successfully updated by update-copyrights), there is a small change to the copyright notice in NEWS which should let NEWS get updated automatically next year. Please remember to include 2022 in the dates for any new files added in future (which means updating any existing uncommitted patches you have that add new files to use the new copyright dates in them).
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-0130-30/+30
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* Fix The GNU ToolChain Authors copyright noticeSiddhesh Poyarekar2021-12-171-1/+1
| | | | | | | | | | | I (and maybe one or two others) added a (C) to the copyright notice regardless of the contribution checklist[1] not mentioning it. Fix all these instances so that the notice reads as "Copyright The GNU Toolchain Authors" across the source code. [1] https://sourceware.org/glibc/wiki/Contribution%20checklist Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Replace --enable-static-pie with --disable-default-pieSiddhesh Poyarekar2021-12-131-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Build glibc programs and tests as PIE by default and enable static-pie automatically if the architecture and toolchain supports it. Also add a new configuration option --disable-default-pie to prevent building programs as PIE. Only the following architectures now have PIE disabled by default because they do not work at the moment. hppa, ia64, alpha and csky don't work because the linker is unable to handle a pcrel relocation generated from PIE objects. The microblaze compiler is currently failing with an ICE. GNU hurd tries to enable static-pie, which does not work and hence fails. All these targets have default PIE disabled at the moment and I have left it to the target maintainers to enable PIE on their targets. build-many-glibcs runs clean for all targets. I also tested x86_64 on Fedora and Ubuntu, to verify that the default build as well as --disable-default-pie work as expected with both system toolchains. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dso-ordering-test.py: Put all sources in one directory [BZ #28550]H.J. Lu2021-11-151-13/+34
| | | | | | | | | | | | | | | | | | | | | | Put all sources for DSO sorting tests in the dso-sort-tests-src directory and compile test relocatable objects with $(objpfx)tst-dso-ordering1-dir/tst-dso-ordering1-a.os: $(objpfx)dso-sort-tests-src/tst-dso-ordering1-a.c $(compile.c) $(OUTPUT_OPTION) to avoid random $< values from $(before-compile) when compiling test relocatable objects with $(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c) compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags) compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) for 3 "make -j 28" parallel builds on a machine with 112 cores at the same time. This partially fixes BZ #28550. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Add a comment for --enable-initfini-array [BZ #27945]H.J. Lu2021-11-131-1/+3
| | | | | Document that --enable-initfini-array is enabled by default in GCC 12, which can be removed when GCC 12 becomes the minimum requirement.
* Configure GCC with --enable-initfini-array [BZ #27945]H.J. Lu2021-11-051-0/+1
| | | | | | | | | | | | | | | | Starting from GCC 12, the .init_array and .fini_array sections are enabled unconditionally by commit 13a39886940331149173b25d6ebde0850668d8b9 Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Jun 8 16:09:24 2021 -0700 Always enable DT_INIT_ARRAY/DT_FINI_ARRAY on Linux configure GCC with --enable-initfini-array to enable them when using GCC release branches. Fixes BZ #27945.
* Use Linux 5.15 in build-many-glibcs.pyJoseph Myers2021-11-021-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.15. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* elf: Testing infrastructure for ld.so DSO sorting (BZ #17645)Chung-Lin Tang2021-10-211-0/+1144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first of a 2-part patch set that fixes slow DSO sorting behavior in the dynamic loader, as reported in BZ #17645. In order to facilitate such a large modification to the dynamic loader, this first patch implements a testing framework for validating shared object sorting behavior, to enable comparison between old/new sorting algorithms, and any later enhancements. This testing infrastructure consists of a Python script scripts/dso-ordering-test.py' which takes in a description language, consisting of strings that describe a set of link dependency relations between DSOs, and generates testcase programs and Makefile fragments to automatically test the described situation, for example: a->b->c->d # four objects linked one after another a->[bc]->d;b->c # a depends on b and c, which both depend on d, # b depends on c (b,c linked to object a in fixed order) a->b->c;{+a;%a;-a} # a, b, c serially dependent, main program uses # dlopen/dlsym/dlclose on object a a->b->c;{}!->[abc] # a, b, c serially dependent; multiple tests generated # to test all permutations of a, b, c ordering linked # to main program (Above is just a short description of what the script can do, more documentation is in the script comments.) Two files containing several new tests, elf/dso-sort-tests-[12].def are added, including test scenarios for BZ #15311 and Redhat issue #1162810 [1]. Due to the nature of dynamic loader tests, where the sorting behavior and test output occurs before/after main(), generating testcases to use support/test-driver.c does not suffice to control meaningful timeout for ld.so. Therefore a new utility program 'support/test-run-command', based on test-driver.c/support_test_main.c has been added. This does the same testcase control, but for a program specified through a command-line rather than at the source code level. This utility is used to run the dynamic loader testcases generated by dso-ordering-test.py. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1162810 Signed-off-by: Chung-Lin Tang <cltang@codesourcery.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* glibcextract.py: Place un-assemblable @@@ in a commentFangrui Song2021-10-191-1/+1
| | | | | | Unlike GCC, Clang parses asm statements and verifies they are valid instructions/directives. Place the magic @@@ into a comment to avoid a parse error.
* build-many-glibcs.py: add powerpc64le glibc variant without multiarchPaul E. Murphy2021-09-241-1/+3
| | | | | | This configuration tests the float128 to ldouble128 redirect support on powerpc64le without the extra wrappers needed to support ifunc on this target.
* Fix build-many-glibcs.py --strip for installed library renamingJoseph Myers2021-09-161-9/+7
| | | | | | | | | | | | | The renaming of installed shared libraries to use the SONAME directly rather than linking to a versioned name stopped build-many-glibcs.py --strip (used to facilitate comparing binaries before and after changes that aren't meant to change any generated code in installed glibc shared libraries) from stripping most of the installed shared libraries, because it stripped only the *.so names. Fix it to strip *.so* names instead and to detect the case of linker scripts using grep instead of hardcoding particular files that are linker scripts. Tested with build-many-glibcs.py --strip.
* Use Linux 5.14 in build-many-glibcs.pyJoseph Myers2021-09-071-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.14. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* Remove "Contributed by" linesSiddhesh Poyarekar2021-09-034-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We stopped adding "Contributed by" or similar lines in sources in 2012 in favour of git logs and keeping the Contributors section of the glibc manual up to date. Removing these lines makes the license header a bit more consistent across files and also removes the possibility of error in attribution when license blocks or files are copied across since the contributed-by lines don't actually reflect reality in those cases. Move all "Contributed by" and similar lines (Written by, Test by, etc.) into a new file CONTRIBUTED-BY to retain record of these contributions. These contributors are also mentioned in manual/contrib.texi, so we just maintain this additional record as a courtesy to the earlier developers. The following scripts were used to filter a list of files to edit in place and to clean up the CONTRIBUTED-BY file respectively. These were not added to the glibc sources because they're not expected to be of any use in future given that this is a one time task: https://gist.github.com/siddhesh/b5ecac94eabfd72ed2916d6d8157e7dc https://gist.github.com/siddhesh/15ea1f5e435ace9774f485030695ee02 Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Port shared code information from the wikiSiddhesh Poyarekar2021-09-031-0/+70
| | | | | | | | | | | | Since the shared code now has special status with respect to copyrights, port them into a more structured format in the source tree and add a python function that parses and returns a dictionary with the information. I need this to exclude these files from the Contributed-by changes and I reckon it would be useful to know these files for future tooling. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Use binutils 2.37 branch in build-many-glibcs.pyJoseph Myers2021-08-091-1/+1
| | | | | | This patch makes build-many-glibcs.py use binutils 2.37 branch. Tested with build-many-glibcs.py (compilers and glibcs builds).
* build-many-glibcs.py: Add x86_64-linux-gnu-minimal configurationFlorian Weimer2021-07-281-0/+10
| | | | | | This configuration exercises various --disable-* configure options. It is expected to catch -Werror failures that only affect these configurations.
* build-many-glibcs.py: Add glibcs-arm-linux-gnueabihf-thumbFlorian Weimer2021-07-091-0/+3
| | | | | Previously, there was no thumb variant, despite that building glibc in Thumb-2 mode is supported.
* Use Linux 5.13 in build-many-glibcs.pyJoseph Myers2021-06-301-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.13. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* nptl_db: Re-use the ELF-to-abilist converter for ABI checkingFlorian Weimer2021-06-291-1/+1
| | | | | | | | | | The previous approach uses readelf -DWs, which does not produce a stable output format (older binutils versions do not include symbol version information). This commit re-uses scripts/abilist.awk with a tweak to include GLIBC_PRIVATE symbols. This awk script is based on objdump -T output, which appears to be stable over time. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* Add libc ABI extension kludge for baseline-violating libdl symbolsFlorian Weimer2021-06-021-1/+25
| | | | | | | | | | | | | | | | | | | Some targets have a GLIBC_2.0 baseline for libdl, while using GLIBC_2.2 for libc. This means that the generated libc.map file does not have any version nodes for GLIBC_2.0 or GLIBC_2.1. However, moving symbols from libdl into libc needs such version nodes. (Future symbol moves from librt will need this as well.) This kludge is only necessary for symbols predating GLIBC_2.2 because the affected targets use GLIBC_2.2 as the baseline for libc. Given the small number and fixed set of affected architectures, no generic mechanism is implemented, and instead the map file fragment is hard-coded in scripts/versions.mk. The compat_symbol macro already emits the appropriate version strings, so no adjustments are needed there. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* scripts/versions.awk: Add local: * to all version nodesFlorian Weimer2021-06-021-5/+1
| | | | | | | | | | | | This requires that all exported symbol versions are listed in Versions files. It results in more consistent behavior across architectures because previously, symbols could be exported via explicit versioned_symbol and compat_symbol macros if the version node existed in some Versions file (without listing the symbol), and it was not the base version for the library (which already had the local: * directive). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* scripts/versions.awk: Add strings and hashes to <first-versions.h>Florian Weimer2021-05-101-0/+36
| | | | | | | | | This generates new macros of this from: They are useful for symbol lookups using _dl_lookup_direct. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Use Linux 5.12 and GCC 11 branch in build-many-glibcs.py.Joseph Myers2021-04-271-2/+2
| | | | | | | | This patch makes build-many-glibcs.py use Linux 5.12 and GCC 11 branch. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* glibcymbols.read_abilist: Add check for duplicate symbolsFlorian Weimer2021-03-161-1/+4
| | | | | | This detects some bogus abilist files. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* scripts/glibcsymbols.py: Extract from scripts/move-symbol-to-libc.pyFlorian Weimer2021-03-162-62/+93
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Allow gdb version 10 in pretty printer tests.Stefan Liebler2021-03-111-1/+2
| | | | | | | | | | | | | With gdb 10, the pretty printer tests are UNSUPPORTED:: The gdb version string (gdb -v) is incorrectly formatted. This is observable in: nptl/test-cond-printers, nptl/test-condattr-printers, nptl/test-mutex-printers, nptl/test-mutexattr-printers, nptl/test-rwlock-printers, nptl/test-rwlockattr-printers After updating the regexp and building with debug-info, all those tests are passing.
* tst: Extend cross-test-ssh.sh to specify if target date can be alteredLukasz Majewski2021-03-081-1/+24
| | | | | | | | | | | | | This code adds new flag - '--allow-time-setting' to cross-test-ssh.sh script to indicate if it is allowed to alter the date on the system on which tests are executed. This change is supposed to be used with test systems, which use virtual machines for testing. The GLIBC_TEST_ALLOW_TIME_SETTING env variable is exported to the remote environment on which the eligible test is run and brings no functional change when it is not. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use Linux 5.11 in build-many-glibcs.py.Joseph Myers2021-02-221-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.11. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* build-many-glibcs.py: Use make -O for more consistent log outputFlorian Weimer2021-02-221-1/+1
| | | | | | | | The -O option avoids interleaving (e.g.) compiler error messages with other build messages, and makes attribution of messages to commands easier. According to my tests, the impact on build time is within the noise.
* Use binutils 2.36 branch in build-many-glibcs.py.Joseph Myers2021-02-041-1/+1
| | | | | | This patch makes build-many-glibcs.py use binutils 2.36 branch. Tested with build-many-glibcs.py (compilers and glibcs builds).
* elf: Avoid RELATIVE relocs in __tunables_initSzabolcs Nagy2021-01-211-1/+11
| | | | | | | | | | | | | | | | | | | | | | | With static pie linking pointers in the tunables list need RELATIVE relocs since the absolute address is not known at link time. We want to avoid relocations so the static pie self relocation can be done after tunables are initialized. This is a simple fix that embeds the tunable strings into the tunable list instead of using pointers. It is possible to have a more compact representation of tunables with some additional complexity in the generator and tunable parser logic. Such optimization will be useful if the list of tunables grows. There is still an issue that tunables_strdup allocates and the failure handling code path is sufficiently complex that it can easily have RELATIVE relocations. It is possible to avoid the early allocation and only change environment variables in a setuid exe after relocations are processed. But that is a bigger change and early failure is fatal anyway so it is not as critical to fix right away. This is bug 27181. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>