The failure is because bash, for some reason, still links against gettimeofday rather than __gettimeofday64, and calls that to seed its internal random number generator. I still can't figure out why it's using the old version, though.
ubuntu@noble-armhf:~$ readelf -W -s a.out | grep timeof # a simple test program that just calls gettimeofday()
9: 00000000 0 FUNC GLOBAL DEFAULT UND __gettimeofday64@GLIBC_2.34 (2)
98: 00000000 0 FUNC GLOBAL DEFAULT UND __gettimeofday64@GLIBC_2.34
ubuntu@noble-armhf:~$ readelf -W -s /bin/bash | grep timeof
105: 00000000 0 FUNC GLOBAL DEFAULT UND gettimeofday@GLIBC_2.4 (2)
faketime redefines gettimeofday, except that it uses the timeval definition from glibc which is of course using 64bit time_t. Mayhem ensues.
The failure is because bash, for some reason, still links against gettimeofday rather than __gettimeofday64, and calls that to seed its internal random number generator. I still can't figure out why it's using the old version, though.
ubuntu@ noble-armhf: ~$ readelf -W -s a.out | grep timeof # a simple test program that just calls gettimeofday() 4@GLIBC_ 2.34 (2) 4@GLIBC_ 2.34 noble-armhf: ~$ readelf -W -s /bin/bash | grep timeof GLIBC_2. 4 (2)
9: 00000000 0 FUNC GLOBAL DEFAULT UND __gettimeofday6
98: 00000000 0 FUNC GLOBAL DEFAULT UND __gettimeofday6
ubuntu@
105: 00000000 0 FUNC GLOBAL DEFAULT UND gettimeofday@
faketime redefines gettimeofday, except that it uses the timeval definition from glibc which is of course using 64bit time_t. Mayhem ensues.