Submitted By: Robert Connolly (ashes) Date: 2004-02-08 Initial Package Version: 2.3.3 Origin: http://dev.gentoo.org/~solar/glibc-2.3.3-got-fix.diff Description: This is a bugfix: "GOTOFF during linking seems to fail to recognize where main() is because it is not visible in the object linked which might not be really legal C but it apparently works anyway." This bug shows up in bind9's testsuite. http://www.gentoo.org/proj/en/hardened/ http://www.linuxfromscratch.org/~robert/winter/Linux/ --- glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 18:14:37.000000000 +0100 +++ glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 23:32:16.000000000 +0100 @@ -73,16 +73,13 @@ _start: addl $_GLOBAL_OFFSET_TABLE_, %ebx /* Push address of our own entry points to .fini and .init. */ - leal __libc_csu_fini@GOTOFF(%ebx), %eax - pushl %eax - leal __libc_csu_init@GOTOFF(%ebx), %eax - pushl %eax + pushl __libc_csu_fini@GOT(%ebx) + pushl __libc_csu_init@GOT(%ebx) pushl %ecx /* Push second argument: argv. */ pushl %esi /* Push first argument: argc. */ - leal BP_SYM (main)@GOTOFF(%ebx), %eax - pushl %eax + pushl BP_SYM (main)@GOT(%ebx) /* Call the user's main function, and exit with its value. But let the libc call main. */