Branch: refs/heads/davem/libperl Home: https://github.com/Perl/perl5 Commit: 88cef7164401e0214051a9f9b9d376325f71d532 https://github.com/Perl/perl5/commit/88cef7164401e0214051a9f9b9d376325f71d532 Author: David Mitchell <da...@iabyn.com> Date: 2024-09-11 (Wed, 11 Sep 2024)
Changed paths: M t/porting/libperl.t Log Message: ----------- t/porting/libperl.t: fix issue with common symbols Test 5 was failing on newer Linux builds with clang and ASAN. This was indirectly because although since around 2020 both gcc and clang have -fno-common by default, clang+ASAN was putting some private symbols in the common section of the libperl object file while under -fno-cpmmon, namely this output from nm: 0000000000000008 C ___asan_globals_registered It so happens that libperl.t handled -fno-common by aliasing a hash, $symbols{data}{common}{}, to another hash, $symbols{data}{bss}{} if {common} was *empty*. It then looked up a particular symbol under {common} and found it even if it was actually under {bss}. This scheme failed as soon as {common} was non-empty even under -fno-common. This commit removes the common-to-bss aliasing trick and instead looks for the symbol under both common and bss. The test passes if *either* is found. This commit also changes the test diagnostic output accordingly. It also now recognises (but ignores) 'w' and 'W' weak symbol types in nm output, such as w __stop_asan_globals To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications