On Thu, 08 Feb 2007 19:04:58 -0800, Paul Pluzhnikov <[EMAIL PROTECTED]> wrote:
> Ignoramus25565 <[EMAIL PROTECTED]> writes:
>
>> Seems to work.
>
> I've reproduced the crash when compiling "int main() { return 0; }"
> on FC6 and running it on FC4.
>
> The reason dynamic linker crashes is that a.out doesn't have
> DT_HASH dynamic tag at all, and FC4 ld-linux.so.2 expects it (and
> divides by l_nbuckets (zero) without checking):
>
> #0  0x00991898 in dl_main (phdr=0x8048034, phnum=224, user_entry=0xbffff64c) 
> at rtld.c:1360
> 1360          for (symidx = main_map->l_buckets[0x6c994f % 
> main_map->l_nbuckets];
>
> Compiling the same code on FC6 with '-Wl,--hash-style=sysv' fixes
> that crash.
>
> Still you are on dangerous ground -- your exe may have subtle
> and non-trivial bugs introduced by "backward" compilation
> environment. Let's hope you have adequate regression tests ...

Seems like using gcc34 is a better option than
'-Wl,--hash-style=sysv', then?

i

>> Also, interestingly, not only the app used to fail witi SIGFPE, but
>> also "ldd app". 
>
> That's not surprising at all -- "ldd" is a simple shell script,
> which tells ld-linux.so.2 to print libraries instead of actually
> loading them. The root cause of the crash is the same in both cases:
> missing DT_HASH dynamic tag.
>
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to