⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elfvsb.exp

📁 GNU binutils是GNU交叉工具链中的一个源码包
💻 EXP
📖 第 1 页 / 共 2 页
字号:
	    visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o xcoff	} else {	    # SunOS non PIC shared libraries don't permit some cases of	    # overriding.	    if { [ string match $visibility "protected" ]		 || [ string match $visibility "protected_undef_def" ] } {		if [ string match $support_protected "no" ] {		    setup_xfail $target_triplet		}	    } else {		setup_xfail "*-*-sunos4*"	    }	    # Non-pic code uses name binding rules for applications to	    # reference variables by gp-relative relocs, which can't be	    # used with overridable symbols.	    if { ![ string match $visibility "hidden_undef" ]		 && ![ string match $visibility "protected_undef" ] } {		setup_xfail "ia64-*-linux*"		setup_xfail "alpha*-*-linux*"	    }	    if { ![ string match $visibility "hidden" ]		 && ![ string match $visibility "hidden_undef" ]		 && ![ string match $visibility "hidden_undef_def" ]		 && ![ string match $visibility "protected_undef" ] } {		setup_xfail "s390x-*-linux*"		if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {		    setup_xfail "sparc*-*-linux*"		}	    }	    setup_xfail "x86_64-*-linux*"	    if { ![istarget hppa*64*-*-linux*] } {		setup_xfail "hppa*-*-linux*"	    }	    visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb	    # Test ELF shared library relocations with a non-zero load	    # address for the library.  Near as I can tell, the R_*_RELATIVE	    # relocations for various targets are broken in the case where	    # the load address is not zero (which is the default).	    if { [ string match $visibility "protected" ]		 || [ string match $visibility "protected_undef_def" ] } {		if [ string match $support_protected "no" ] {		    setup_xfail $target_triplet		}	    } else {		setup_xfail "*-*-sunos4*"		setup_xfail "*-*-linux*libc1"	    }	    if { [ string match $visibility "hidden_normal" ]		 || [ string match $visibility "hidden_weak" ]		 || [ string match $visibility "protected" ]		 || [ string match $visibility "protected_undef_def" ]		 || [ string match $visibility "protected_weak" ]		 || [ string match $visibility "normal" ] } {		setup_xfail "powerpc-*-linux*"		setup_xfail "s390x-*-linux*"		if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {		    setup_xfail "sparc*-*-linux*"		}	    }	    if { ![ string match $visibility "hidden_undef" ]		 && ![ string match $visibility "protected_undef" ] } {		setup_xfail "ia64-*-linux*"		setup_xfail "alpha*-*-linux*"		setup_xfail "mips*-*-linux*"	    }	    setup_xfail "x86_64-*-linux*"	    if { ![istarget hppa*64*-*-linux*] } {		setup_xfail "hppa*-*-linux*"	    }	    visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \		mainnp.o sh1np.o sh2np.o elfvsb \		"-T $srcdir/$subdir/elf-offset.ld"	} }	# Now compile the code using -fpic.	if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o] 	    || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {	    unresolved "visibility ($visibility)"	} else {	    if { [ string match $visibility "protected" ]		 || [ string match $visibility "protected_undef_def" ] } {		if [ string match $support_protected "no" ] {		    setup_xfail $target_triplet		}	    }	    # SunOS can not compare function pointers correctly	    if [istarget "*-*-sunos4*"] {		visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o sun4	    } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {		visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o xcoff	    } else {		visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o elfvsb	    } }	}    }    # Now do the same tests again, but this time compile main.c PIC.    if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {	unresolved "visibility ($visibility) (PIC main, non PIC so)"	unresolved "visibility ($visibility) (PIC main)"    } else {	if { [file exists $tmpdir/sh1np.o ] && [ file exists $tmpdir/sh2np.o ] } {	    if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {		visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o xcoff	    } else {		# SunOS non PIC shared libraries don't permit some cases of		# overriding.		if { [ string match $visibility "protected" ]		     || [ string match $visibility "protected_undef_def" ] } {		    if [ string match $support_protected "no" ] {			setup_xfail $target_triplet		    }		} else {		    setup_xfail "*-*-sunos4*"		}		if { ![ string match $visibility "hidden_undef" ]		     && ![ string match $visibility "protected_undef" ] } {		    setup_xfail "ia64-*-linux*"		    setup_xfail "alpha*-*-linux*"		}		if { ![ string match $visibility "hidden" ]		     && ![ string match $visibility "hidden_undef" ]		     && ![ string match $visibility "hidden_undef_def" ]		     && ![ string match $visibility "protected_undef" ] } {		    setup_xfail "s390x-*-linux*"		    if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainp.o] } {			setup_xfail "sparc*-*-linux*"		    }		}		setup_xfail "x86_64-*-linux*"		if { ![istarget hppa*64*-*-linux*] } {		    setup_xfail "hppa*-*-linux*"		}		visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb	    }	} else {	    unresolved "visibility (PIC main, non PIC so)"	}	if { [file exists $tmpdir/sh1p.o ] && [ file exists $tmpdir/sh2p.o ] } {	    if { [ string match $visibility "protected" ]		 || [ string match $visibility "protected_undef_def" ] } {		if [ string match $support_protected "no" ] {		    setup_xfail $target_triplet		}	    }	    if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {		visibility_test $visibility vmpp "visibility ($visibility) (PIC main)" mainp.o sh1p.o sh2p.o xcoff	    } else {		visibility_test $visibility vmpp "visibility ($visibility) (PIC main)" mainp.o sh1p.o sh2p.o elfvsb	    }	} else {	    unresolved "visibility ($visibility) (PIC main)"	}    }}if [istarget mips*-*-*] {    set picflag ""} else {    # Unfortunately, the gcc argument is -fpic and the cc argument is    # -KPIC.  We have to try both.    set picflag "-fpic"    send_log "$CC $picflag\n"    verbose "$CC $picflag"    catch "exec $CC $picflag" exec_output    send_log "$exec_output\n"    verbose "--" "$exec_output"    if { [string match "*illegal option*" $exec_output] \	 || [string match "*option ignored*" $exec_output] \	 || [string match "*unrecognized option*" $exec_output] \	 || [string match "*passed to ld*" $exec_output] } {	if [istarget *-*-sunos4*] {	    set picflag "-pic"	} else {	    set picflag "-KPIC"	}    }}verbose "Using $picflag to compile PIC code"visibility_run hiddenvisibility_run hidden_normalvisibility_run hidden_undefvisibility_run hidden_undef_defvisibility_run hidden_weakvisibility_run protectedvisibility_run protected_undefvisibility_run protected_undef_defvisibility_run protected_weakvisibility_run normalif { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } {    unresolved "common hidden symbol"} else {    if ![ld_simple_link $ld tmpdir/common "tmpdir/common.o"] {	fail "common hidden symbol"    } else {	pass "common hidden symbol"    }}if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {    unresolved "weak hidden symbol"} else {   if { ![ld_compile "$CC -g $CFLAGS $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {	unresolved "weak hidden symbol"    } else {	if ![ld_simple_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] {	    fail "weak hidden symbol"	} else {	    if ![ld_simple_link $ld tmpdir/weak "tmpdir/test.o tmpdir/sh3.o"] {		fail "weak hidden symbol DSO last"	    } else {		pass "weak hidden symbol DSO last"	    }	    if ![ld_simple_link $ld tmpdir/weak "tmpdir/sh3.so tmpdir/test.o"] {		fail "weak hidden symbol DSO first"	    } else {		pass "weak hidden symbol DSO first"	    }	}    }}if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {    # Remove the temporary directory.    catch "exec rm -rf $tmpdir" exec_status}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -