The branch 'gabriel/powerpc-ieee128-printscan' was deleted. It previously pointed to: d9fa17b... RFC: powerpc64le: Enable support for IEEE long double Diff: !!! WARNING: THE FOLLOWING COMMITS ARE NO LONGER ACCESSIBLE (LOST): ------------------------------------------------------------------- d9fa17b... RFC: powerpc64le: Enable support for IEEE long double 4992aa5... powerpc64le: Require a compiler with -mno-gnu-attribute 9084ecd... ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong 5958c57... Avoid compat symbols for totalorder in powerpc64le IEEE lon 547bbef... ldbl-128ibm-compat: Compiler flags for stdio functions 8d21b26... Do not redirect calls to __GI_* symbols, when redirecting t c6bb3a4... ldbl-128ibm-compat: Add *cvt functions 7966fb8... Refactor *cvt functions implementation (5/5) b4cb03e... Refactor *cvt functions implementation (4/5) 4d6a325... Refactor *cvt functions implementation (3/5) 1f10b80... Refactor *cvt functions implementation (2/5) b84bffd... Refactor *cvt functions implementation (1/5) f612070... ldbl-128ibm-compat: Add tests for strfroml, strtold, and wc b33232b... ldbl-128ibm-compat: Add tests for strfmon and strfmon_l 76f8344... ldbl-128ibm-compat: Add strfmon_l with IEEE long double for 6611627... ldbl-128ibm-compat: Add syslog functions d75118e... ldbl-128ibm-compat: Add obstack printing functions 03b7bf2... ldbl-128ibm-compat: Add ISO C99 versions of scanf functions c9a8cf4... ldbl-128ibm-compat: Reuse tests for err.h and error.h funct df8545f... ldbl-128ibm-compat: Add error.h functions 7512cfb... ldbl-128ibm-compat: Add err.h functions d77fb42... ldbl-128ibm-compat: Add argp_error and argp_failure bc2b28d... ldbl-128ibm-compat: Add wide character scanning functions fd64b59... ldbl-128ibm-compat: Add regular character scanning function 1592827... ldbl-128ibm-compat: Test positional arguments c2f8a35... ldbl-128ibm-compat: Test double values 4d36596... ldbl-128ibm-compat: Add wide character, fortified printing 6c63ba6... ldbl-128ibm-compat: Add regular character, fortified printi 2497c0c... ldbl-128ibm-compat: Add wide character printing functions ce7633e... ldbl-128ibm-compat: Add regular character printing function commit d9fa17b4597aefa40b705f64c7304a83b62f0185 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:48:28 2019 -0300 RFC: powerpc64le: Enable support for IEEE long double DO NOT COMMIT! Changes since v1: - Use __LONG_DOUBLE_USES_FLOAT128 directly. -- 8< -- On platforms where long double may have two different formats, i.e.: the same format as double (64-bits) or something else (128-bits), building with -mlong-double-128 is the default and function calls in the user program match the name of the function in Glibc. When building with -mlong-double-64, Glibc installed headers redirect such calls to the appropriate function. This patch adds similar redirections to be used by user code builds in IEEE long double mode (-mabi=ieeelongdouble). It also skips some uses of libc_hidden_proto in internal headers, because they also produce redirections, causing a redirection conflict. PS: Missing NEWS entry. commit 4992aa5de10a4877f97096c0afa5c5691f625762 Author: Gabriel F. T. Gomes Date: Fri Oct 11 15:20:05 2019 -0300 powerpc64le: Require a compiler with -mno-gnu-attribute Changes since v1: - Added mentions to the build requirement in manual/install.texi, INSTALL (regenerated) and NEWS. -- 8< -- On powerpc64le, a few files are built on IEEE long double mode (-mabi=ieeelongdouble), whereas most are built on IBM long double mode (-mabi=ibmlongdouble, the default for -mlong-double-128). Since binutils 2.31, linking object files with different long double modes causes errors similar to: ld: libc_pic.a(s_isinfl.os) uses IBM long double, libc_pic.a(ieee128-qefgcvt.os) uses IEEE long double. collect2: error: ld returned 1 exit status make[2]: *** [../Makerules:649: libc_pic.os] Error 1 The warnings are fair and correct, but in order for glibc to have support for both long double modes on powerpc64le, they have to be ignored. This can be accomplished with the use of -mno-gnu-attribute option when building the few files that require IEEE long double mode. However, -mno-gnu-attribute is not available in GCC 6, the minimum version required to build glibc, so this patch adds a test for this feature in powerpc64le builds, and fails early if it's not available. Tested, on powerpc64le, that the build fails early with GCC 6 and that it succeeds with GCC 7 or greater. commit 9084ecd967de262646ec6a527c8670a1ab364be4 Author: Gabriel F. T. Gomes Date: Tue Sep 10 08:05:03 2019 -0500 ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128 Changes since v1: - Do not try to remove -mabi=ieeelongdouble, since it hasn't been added. The removal is a residue from our initial development. -- 8< -- Some compiler versions, e.g. GCC 7, complain when -mlong-double-128 is used together with -mabi=ibmlongdouble or -mabi=ieeelongdouble, producing the following error message: cc1: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’ This patch removes -mlong-double-128 from the compilation lines that explicitly request -mabi=*longdouble. Tested for powerpc64le. commit 5958c576fae361db66398899e050e0f6b753e8e5 Author: Gabriel F. T. Gomes Date: Mon Sep 9 12:59:46 2019 -0500 Avoid compat symbols for totalorder in powerpc64le IEEE long double Changes since v1: - Added comment on the redefinition of libm_alias_float128_other_r_ldbl. -- 8< -- On powerpc64le, the libm_alias_float128_other_r_ldbl macro is used to create an alias between totalorderf128 and __totalorderlieee128, as well as between the totalordermagf128 and __totalordermaglieee128. However, the totalorder* and totalordermag* functions changed their parameter type since commit ID 42760d764649 and got compat symbols for their old versions. With this change, the aforementioned macro would create two conflicting aliases for __totalorderlieee128 and __totalordermaglieee128. This patch avoids the creation of the alias between the IEEE long double symbols (__totalorderl*ieee128) and the compat symbols, because the IEEE long double functions have never been exported thus don't need such compat symbol. commit 547bbef79b0d4cf45368f6149d4cc25e8183717a Author: Tulio Magno Quites Machado Filho Date: Mon Jul 30 12:04:40 2018 -0300 ldbl-128ibm-compat: Compiler flags for stdio functions No changes since v1. -- 8< -- Some of the files that provide stdio.h and wchar.h functions have a filename prefixed with 'io', such as 'iovsprintf.c'. On platforms that imply ldbl-128ibm-compat, these files must be compiled with the flag -mabi=ibmlongdouble. This patch adds this flag to their compilation. Notice that this is not required for the other files that provide similar functions, because filenames that are not prefixed with 'io' have ldbl-128ibm-compat counterparts in the Makefile, which already adds -mabi=ibmlongdouble to them. commit 8d21b26af1efd1f4cef8597065f3b2fdf733b480 Author: Tulio Magno Quites Machado Filho Date: Sun Oct 20 16:00:30 2019 -0500 Do not redirect calls to __GI_* symbols, when redirecting to *ieee128 Changes since v1: - Reduced the number of changes to the minimum required to build *cvt files in -mabi=ieeelongdouble mode. - Added __LONG_DOUBLE_USES_FLOAT128 to all long-double.h files. -- 8< -- On platforms where long double has IEEE binary128 format as a third option (initially, only powerpc64le), many exported functions are redirected to their __*ieee128 equivalents. This redirection is provided by installed headers such as stdio-ldbl.h, and is supposed to work correctly with user code. However, during the build of glibc, similar redirections are employed, in internal headers, such as include/stdio.h, in order to avoid extra PLT entries. These redirections conflict with the redirections to __*ieee128, and must be avoided during the build. This patch protects the second redirections with a test for __LONG_DOUBLE_USES_FLOAT128, a new macro that is defined to 1 when functions that deal with long double typed values reuses the _Float128 implementation (this is currently only true for powerpc64le). Tested for powerpc64le, x86_64, and with build-many-glibcs.py. Co-authored-by: Gabriel F. T. Gomes commit c6bb3a47fa3aec8f03712f9c9d5272601868c62b Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:48:24 2019 -0300 ldbl-128ibm-compat: Add *cvt functions No changes since v1. -- 8< -- This patch adds IEEE long double versions of q*cvt* functions for powerpc64le. Unlike all other long double to/from string conversion functions, these do not rely on internal functions that can take floating-point numbers with different formats and act on them accordingly, instead, the related files are rebuilt with the -mabi=ieeelongdouble compiler flag set. Having -mabi=ieeelongdouble passed to the compiler causes the object files to be marked with a .gnu_attribute that is incompatible with the .gnu_attribute in files built with -mabi=ibmlongdouble (the default). The difference causes error messages similar to the following: ld: libc_pic.a(s_isinfl.os) uses IBM long double, libc_pic.a(ieee128-qefgcvt_r.os) uses IEEE long double. collect2: error: ld returned 1 exit status make[2]: *** [../Makerules:649: libc_pic.os] Error 1 Although this warning is useful in other situations, the library actually needs to have functions with different long double formats, so .gnu_attribute generation is explicitly disabled for these files with the use of -mno-gnu-attribute. Tested for powerpc64le on the branch that actually enables the sysdeps/ieee754/ldbl-128ibm-compat for powerpc64le. commit 7966fb87cdf3d07b5ac70537359490859fd2707d Author: Gabriel F. T. Gomes Date: Thu Oct 17 21:49:57 2019 -0300 Refactor *cvt functions implementation (5/5) Changes since v1: - Adapted after patch v1 19/31 (remove hidden_* uses) was dropped. - Fixed unintended removal of cvt* symbols on alpha and s390x (now tested with build-many-glibcs.py). -- 8< -- This patch is to be squashed with the other n/5 refactoring patches. This patch replaces the use of the APPEND macro with one new macro being defined for each of the cvt* functions. This makes it easier to define functions names for IEEE long double on powerpc64le, e.g. __ecvtieee128. commit b4cb03e6d90bc48e77ea3f006678994574a47886 Author: Gabriel F. T. Gomes Date: Thu Oct 17 21:16:46 2019 -0300 Refactor *cvt functions implementation (4/5) Changes since v1: - Adapted after patch v1 19/31 (remove hidden_* uses) was dropped. - Fixed unintended removal of cvt* symbols on alpha and s390x (now tested with build-many-glibcs.py). -- 8< -- This patch is to be squashed with the other n/5 refactoring patches. This patch splits the definition of the symbol names into separate files for double and long double, which will make it easier to define new symbol names for IEEE long double functions on powerpc64le. commit 4d6a3259405eecb85f4a075e1cd468c15f227806 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:48:16 2019 -0300 Refactor *cvt functions implementation (3/5) No changes since v1. -- 8< -- This patch is to be squashed with the other n/5 refactoring patches. This patch only moves and merges the contents of misc/qefgcvt.c and misc/qefgcvt_r.c into misc/efgcvt-ldbl-macros.h. commit 1f10b8057eb608a0feded160624552772afc85d5 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:48:12 2019 -0300 Refactor *cvt functions implementation (2/5) No changes since v1. -- 8< -- This patch is to be squashed with the other n/5 refactoring patches. This patch only moves and merges the contents of misc/efgcvt-template.c and misc/efgcvt_r-template.c into misc/efgcvt-dbl-macros.h. commit b84bffdeaaa63451fdb993d351fee721bebfe0c6 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:48:08 2019 -0300 Refactor *cvt functions implementation (1/5) No changes since v1. -- 8< -- This patch is to be squashed with the other n/5 refactoring patches. I split it into these 5 patches, because even using -M and -C, the patches looks as if a lot has changed, when it's basically just moving code around. The final commit will be the squashing of patches 1 to 5, with the following commit message: -- 8< -- This patch refactors the *cvt functions implementation in a way that makes it easier to re-use them for implementing the IEEE long double on powerpc64le. By splitting the implementation per se in one file (efgcvt-template.c) and the alias definitions in others (e.g. efgcvt.c), the new code makes it easier to define new function names, such as __qecvtieee128. commit f61207054da2f3786a81cf0cbfdc820366a9f499 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:48:00 2019 -0300 ldbl-128ibm-compat: Add tests for strfroml, strtold, and wcstold No changes since v1. -- 8< -- Since the commit commit 86a0f56158bd9cbaf2d640e2e6c66539f4cbbcc1 Author: Rajalakshmi Srinivasaraghavan Date: Thu Jun 28 13:57:50 2018 +0530 ldbl-128ibm-compat: Introduce ieee128 symbols IEEE long double versions of strfroml, strtold, and wcstold have been prepared, but not exposed (which will only happen when the full support for IEEE long double is complete). This patch adds tests for these functions in both IBM and IEEE long double mode. commit b33232be446c05628e6cd384e0b274dcb34936d3 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:56 2019 -0300 ldbl-128ibm-compat: Add tests for strfmon and strfmon_l No changes since v1. -- 8< -- This patch adds elementary tests to check that strfmon and strfmon_l correctly evaluate long double values with IBM Extended Precision and IEEE binary128 format. Tested for powerpc64le. commit 76f8344e76926e26e3c331dc5ac146ec0d0c5455 Author: Rajalakshmi Srinivasaraghavan Date: Thu Jun 28 15:17:42 2018 +0530 ldbl-128ibm-compat: Add strfmon_l with IEEE long double format No changes since v1. -- 8< -- Similarly to what has been done for printf-like functions, more specifically to the internal implementation in __vfprintf_internal, this patch extends __vstrfmon_l_internal to deal with long double values with binary128 format (as a third format option and reusing the float128 implementation). Tested for powerpc64le and x86_64. commit 661162782a64a3b44f5b5c2712681118b4d54184 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:51 2019 -0300 ldbl-128ibm-compat: Add syslog functions Changes since v1: - Moved the test to a container, which stopped messages being written to the system log. Comment from v1: I'm using 'syslog (LOG_DEBUG, etc.);' and support_capture_subprocess in the test case, which I believe will not print to the console, but I'm not sure if changing some system setting to high verbosity will disturb people's lives. Please advise. :) -- 8< -- Similarly to __vfprintf_internal and __vfscanf_internal, the internal implementation of syslog functions (__vsyslog_internal) takes a 'mode_flags' parameter used to select the format of long double parameters. This patch adds variants of the syslog functions that set 'mode_flags' to PRINTF_LDBL_USES_FLOAT128, thus enabling the correct printing of long double values on powerpc64le, when long double has IEEE binary128 format (-mabi=ieeelongdouble). Tested for powerpc64le. commit d75118e56217fff72ef2291ff11aab138184dd90 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:47 2019 -0300 ldbl-128ibm-compat: Add obstack printing functions No changes since v1. -- 8< -- Similarly to the functions from the *printf family, this patch adds implementations for __obstack_*printf* functions that set the 'mode_flags' parameter to PRINTF_LDBL_USES_FLOAT128, before making calls to __vfprintf_internal (indirectly through __obstack_vprintf_internal). Tested for powerpc64le. commit 03b7bf2a5ac362aa37c18ef932f60ef3e7bb1f33 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:43 2019 -0300 ldbl-128ibm-compat: Add ISO C99 versions of scanf functions No changes since v1. -- 8< -- In the format string for *scanf functions, the '%as', '%aS', and '%a[]' modifiers behave differently depending on ISO C99 compatibility and on _GNU_SOURCE. When _GNU_SOURCE is not set and when in compatibility with ISO C99, these modifiers consume a floating-point argument. Otherwise, they behave like ascanf, and allocate memory for the output. This patch adds the IEEE binary128 variant of these functions for the third long double format on powerpc64le. Tested for powerpc64le. commit c9a8cf4ad780225f20a0010e411cdd6bacd19b30 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:39 2019 -0300 ldbl-128ibm-compat: Reuse tests for err.h and error.h functions No changes since v1. -- 8< -- Commit IDs 9771e6cb5102 and 7597b0c7f711 added tests for the functions from err.h and error.h that can take long double parameters. Afterwards, commit ID f0eaf8627654 reused them on architectures that changed the long double format from the same as double to something else (i.e.: architectures that imply ldbl-opt). This patch reuses it again for IEEE long double on powerpc64le. Tested for powerpc64le. commit df8545f1aa57883b18294e491be15df966d81191 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:35 2019 -0300 ldbl-128ibm-compat: Add error.h functions No changes since v1. -- 8< -- Use the recently added, internal functions, __error_at_line_internal and __error_internal, to provide error.h functions that can take long double arguments with IEEE binary128 format on platforms where long double can also take double format or some non-IEEE format (currently, this means powerpc64le). Tested for powerpc64le. commit 7512cfb00a5c3c31988816ecf0f323e55c93fd7c Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:30 2019 -0300 ldbl-128ibm-compat: Add err.h functions No changes since v1. -- 8< -- Use the recently added, internal functions, __vwarnx_internal and __vwarn_internal, to provide err.h functions that can take long double arguments with IEEE binary128 format on platforms where long double can also take double format or some non-IEEE format (currently, this means powerpc64le). Tested for powerpc64le. commit d77fb42a4ed1dded279b791cbb3c8d8e86da5954 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:25 2019 -0300 ldbl-128ibm-compat: Add argp_error and argp_failure No changes since v1. -- 8< -- Use the recently added, internal functions, __argp_error_internal and __argp_failure_internal, to provide argp_error and argp_failure that can take long double arguments with IEEE binary128 format on platforms where long double can also take double format or some non-IEEE format (currently, this means powerpc64le). Tested for powerpc64le. commit bc2b28d5a00c7f375428d4cc69a6a6526cf2978d Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:21 2019 -0300 ldbl-128ibm-compat: Add wide character scanning functions No changes since v1. -- 8< -- Similarly to what was done for regular character scanning functions, this patch uses the new mode mask, SCANF_LDBL_USES_FLOAT128, in the 'mode' argument of the wide characters scanning function, __vfwscanf_internal (which is also extended to support scanning floating-point values with IEEE binary128, by redirecting calls to __wcstold_internal to __wcstof128_internal). Tested for powerpc64le. commit fd64b59c03e3b744db68c5c9738de40b69a4bdbe Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:16 2019 -0300 ldbl-128ibm-compat: Add regular character scanning functions No changes since v1. -- 8< -- The 'mode' argument to __vfscanf_internal allows the selection of the long double format for all long double arguments requested by the format string. Currently, there are two possibilities: long double with the same format as double or long double as something else. The 'something else' format varies between architectures, and on powerpc64le, it means IBM Extended Precision format. In preparation for the third option of long double format on powerpc64le, this patch uses the new mode mask, SCANF_LDBL_USES_FLOAT128, which tells __vfscanf_internal to call __strtof128_internal, instead of __strtold_internal, and save the output into a _Float128 variable. Tested for powerpc64le. commit 15928276f9a32995af199bffe13b044d14e49870 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:12 2019 -0300 ldbl-128ibm-compat: Test positional arguments No changes since v1. -- 8< -- The format string can request positional parameters, instead of relying on the order in which they appear as arguments. Since this has an effect on how the type of each argument is determined, this patch extends the test cases to use positional parameters with mixed double and long double types, to verify that the IEEE long double implementations of *printf work correctly in this scenario. Tested for powerpc64le. commit c2f8a353d1939fb290c098f432354765fd5978de Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:06 2019 -0300 ldbl-128ibm-compat: Test double values No changes since v1. -- 8< -- A single format string can take double and long double parameters at the same time. Internally, these parameters are routed to the same function, which correctly reads them and calls the underlying functions responsible for the actual conversion to string. This patch adds a new case to test this scenario. Tested for powerpc64le. commit 4d36596c6957cd48c0f8d4e84ee6a3fcdf5037db Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:47:01 2019 -0300 ldbl-128ibm-compat: Add wide character, fortified printing functions No changes since v1. -- 8< -- Similarly to what was done for the regular character, fortified printing functions, this patch combines the mode masks PRINTF_LDBL_USES_FLOAT128 and PRINTF_FORTIFY to provide wide character versions of fortified printf functions. It also adds two flavors of test cases: one that explicitly calls the fortified functions, and another that reuses the non-fortified test, but defining _FORTIFY_SOURCE as 2. The first guarantees that the implementations are actually being tested (independently of what's in bits/wchar2.h), whereas the second guarantees that the redirections calls the correct function in the IBM and IEEE long double cases. Tested for powerpc64le. commit 6c63ba67512ea9dc052fc7d1569236c948e1d9a9 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:46:57 2019 -0300 ldbl-128ibm-compat: Add regular character, fortified printing functions No changes since v1. -- 8< -- Since the introduction of internal functions with explicit flags for the printf family of functions, the 'mode' parameter can be used to select which format long double parameters have (with the mode flags: PRINTF_LDBL_IS_DBL and PRINTF_LDBL_USES_FLOAT128), as well as to select whether to check for overflows (mode flag: PRINTF_FORTIFY). This patch combines PRINTF_LDBL_USES_FLOAT128 and PRINTF_FORTIFY to provide the IEEE binary128 version of printf-like function for platforms where long double can take this format, in addition to the double format and to some non-ieee format (currently, this means powerpc64le). There are two flavors of test cases provided with this patch: one that explicitly calls the fortified functions, for instance __asprintf_chk, and another that reuses the non-fortified test, but defining _FORTIFY_SOURCE as 2. The first guarantees that the implementations are actually being tested (in bits/stdio2.h, vprintf gets redirected to __vfprintf_chk, which would leave __vprintf_chk untested), whereas the second guarantees that the redirections calls the correct function in the IBM and IEEE long double cases. Tested for powerpc64le. commit 2497c0c917f94e559dceaff5e3e190fe22e31bc4 Author: Gabriel F. T. Gomes Date: Thu Jul 11 11:46:51 2019 -0300 ldbl-128ibm-compat: Add wide character printing functions No changes since v1. -- 8< -- Similarly to what was done for regular character printing functions, this patch uses the new mode mask, PRINTF_LDBL_USES_FLOAT128, in the 'mode' argument of the wide characters printing function, __vfwprintf_internal (which is also extended to support printing floating-point values with IEEE binary128, by saving floating-point values into variables of type __float128 and adjusting the parameters to __printf_fp and __printf_fphex as if it was a call from a wide-character version of strfromf128 (even though such version does not exist)). Tested for powerpc64le. commit ce7633efd9d4066b1a404dc1c200a0a860c88223 Author: Gabriel F. T. Gomes Date: Thu Aug 8 10:42:35 2019 -0300 ldbl-128ibm-compat: Add regular character printing functions No changes since v1. -- 8< -- The 'mode' argument to __vfprintf_internal allows the selection of the long double format for all long double arguments requested by the format string. Currently, there are two possibilities: long double with the same format as double or long double as something else. The 'something else' format varies between architectures, and on powerpc64le, it means IBM Extended Precision format. In preparation for the third option of long double format on powerpc64le, this patch uses the new mode mask, PRINTF_LDBL_USES_FLOAT128, which tells __vfprintf_internal to save the floating-point values into variables of type __float128 and adjusts the parameters to __printf_fp and __printf_fphex as if it was a call from strfromf128. Many files from the stdio-common, wcsmbs, argp, misc, and libio directories will have IEEE binary128 counterparts. Setting the correct compiler options to these files (original and counterparts) would produce a large amount of repetitive Makefile rules. To avoid this repetition, this patch adds a Makefile routine that iterates over the files adding or removing the appropriate flags. Tested for powerpc64le.