Hi, Thomas Schwinge <tho...@schwinge.name> skribis:
> On Fri, 22 Jul 2011 17:53:12 +0200, l...@gnu.org wrote: >> Pushed a slightly different version, thanks! >> >> http://git.savannah.gnu.org/cgit/hurd/glibc.git/commit/?h=t/init-first.c&id=53b56b1101fc9bb4f295f23f54e7e19f8da8da16 > > Just a heads-up, and I'm afraid, but with this patch I get: > > $ ./testrun.sh ./libc.so > Segmentation fault > > Undoing it (see below), I'm back in service: > > $ ./testrun.sh ./libc.so > GNU C Library development release version 2.11.90, by Roland McGrath et > al. > [...] > > This is still based on 2010-04 glibc sources, GCC 4.4, and old binutils > 2.20.1. The patch solved a problem for me with GCC 4.5 and Binutils 2.21. > Perhaps it'd really be best to write this in a few lines of assembly? Perhaps. OTOH, it’s really a compiler bug if __builtin_frame_address or __builtin_return_address don’t behave as advertised. It should definitely be more reliable than fiddling with the address of local variables. Thanks, Ludo’.