;;
darwin* | rhapsody*)
+ # this will be overwritten by pass_all, but leave it in just in case
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
-netbsd*)
+netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
else
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1757: checking for object suffix" >&5
+echo "configure:1759: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1783: checking for executable suffix" >&5
+echo "configure:1785: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1820: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1822: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1882: checking for file" >&5
+echo "configure:1884: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1953: checking for $ac_word" >&5
+echo "configure:1955: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1985: checking for $ac_word" >&5
+echo "configure:1987: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2020: checking for $ac_word" >&5
+echo "configure:2022: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2052: checking for $ac_word" >&5
+echo "configure:2054: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2119 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2121 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:2155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
rm -rf conftest*
;;
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2171: checking whether the C compiler needs -belf" >&5
+echo "configure:2215: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2184 "configure"
+#line 2228 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2381: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2425: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2404: checking whether to install libbfd" >&5
+echo "configure:2448: checking whether to install libbfd" >&5
# Check whether --enable-install-libbfd or --disable-install-libbfd was given.
if test "${enable_install_libbfd+set}" = set; then
enableval="$enable_install_libbfd"
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2441: checking for executable suffix" >&5
+echo "configure:2485: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2481: checking for $ac_word" >&5
+echo "configure:2525: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2511: checking for $ac_word" >&5
+echo "configure:2555: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2562: checking for $ac_word" >&5
+echo "configure:2606: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2594: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2638: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cat > conftest.$ac_ext << EOF
-#line 2605 "configure"
+#line 2649 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2636: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2641: checking whether we are using GNU C" >&5
+echo "configure:2685: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2669: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2713: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ALL_LINGUAS="fr tr ja es sv da zh_CN ro"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2703: checking how to run the C preprocessor" >&5
+echo "configure:2747: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2718 "configure"
+#line 2762 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2735 "configure"
+#line 2779 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2752 "configure"
+#line 2796 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2785: checking for $ac_word" >&5
+echo "configure:2829: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2813: checking for ANSI C header files" >&5
+echo "configure:2857: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2818 "configure"
+#line 2862 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2843 "configure"
+#line 2887 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2861 "configure"
+#line 2905 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
+#line 2926 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2917: checking for working const" >&5
+echo "configure:2961: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
+#line 2966 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2992: checking for inline" >&5
+echo "configure:3036: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2999 "configure"
+#line 3043 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3032: checking for off_t" >&5
+echo "configure:3076: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3037 "configure"
+#line 3081 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3065: checking for size_t" >&5
+echo "configure:3109: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3070 "configure"
+#line 3114 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3100: checking for working alloca.h" >&5
+echo "configure:3144: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3105 "configure"
+#line 3149 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3133: checking for alloca" >&5
+echo "configure:3177: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3138 "configure"
+#line 3182 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3198: checking whether alloca needs Cray hooks" >&5
+echo "configure:3242: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3203 "configure"
+#line 3247 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3228: checking for $ac_func" >&5
+echo "configure:3272: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3233 "configure"
+#line 3277 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3283: checking stack direction for C alloca" >&5
+echo "configure:3327: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3291 "configure"
+#line 3335 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
fi
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3335: checking for $ac_hdr" >&5
+echo "configure:3379: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3340 "configure"
+#line 3384 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3374: checking for $ac_func" >&5
+echo "configure:3418: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3379 "configure"
+#line 3423 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3427: checking for working mmap" >&5
+echo "configure:3471: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3435 "configure"
+#line 3479 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
}
EOF
-if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3603: checking for $ac_hdr" >&5
+echo "configure:3660: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3608 "configure"
+#line 3665 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3643: checking for $ac_func" >&5
+echo "configure:3700: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3648 "configure"
+#line 3705 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3700: checking for $ac_func" >&5
+echo "configure:3757: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3705 "configure"
+#line 3762 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3762: checking for LC_MESSAGES" >&5
+echo "configure:3819: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3767 "configure"
+#line 3824 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3795: checking whether NLS is requested" >&5
+echo "configure:3852: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3815: checking whether included gettext is requested" >&5
+echo "configure:3872: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3834: checking for libintl.h" >&5
+echo "configure:3891: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3839 "configure"
+#line 3896 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3861: checking for gettext in libc" >&5
+echo "configure:3918: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3866 "configure"
+#line 3923 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3889: checking for bindtextdomain in -lintl" >&5
+echo "configure:3946: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3897 "configure"
+#line 3954 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3924: checking for gettext in libintl" >&5
+echo "configure:3981: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3929 "configure"
+#line 3986 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3964: checking for $ac_word" >&5
+echo "configure:4021: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3998: checking for $ac_func" >&5
+echo "configure:4055: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4003 "configure"
+#line 4060 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4053: checking for $ac_word" >&5
+echo "configure:4110: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4089: checking for $ac_word" >&5
+echo "configure:4146: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
cat > conftest.$ac_ext <<EOF
-#line 4121 "configure"
+#line 4178 "configure"
#include "confdefs.h"
int main() {
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4161: checking for $ac_word" >&5
+echo "configure:4218: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4195: checking for $ac_word" >&5
+echo "configure:4252: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4231: checking for $ac_word" >&5
+echo "configure:4288: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4321: checking for catalogs to be installed" >&5
+echo "configure:4378: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4349: checking for linux/version.h" >&5
+echo "configure:4406: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4354 "configure"
+#line 4411 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4437: checking for a BSD compatible install" >&5
+echo "configure:4494: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
BFD_HOST_U_64_BIT=
echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:4497: checking for long long" >&5
+echo "configure:4554: checking for long long" >&5
if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4502 "configure"
+#line 4559 "configure"
#include "confdefs.h"
int main() {
unsigned long long ll = 18446744073709551615ULL;
; return 0; }
EOF
-if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_has_long_long=yes
else
if test $bfd_cv_has_long_long = yes; then
BFD_HOST_LONG_LONG=1
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:4525: checking size of long long" >&5
+echo "configure:4582: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 4531 "configure"
+#line 4588 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (long long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long_long=$ac_size
else
fi
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:4566: checking size of long" >&5
+echo "configure:4623: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 4572 "configure"
+#line 4629 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:4582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long=$ac_size
else
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4640: checking for build system executable suffix" >&5
+echo "configure:4697: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4668: checking for $ac_hdr" >&5
+echo "configure:4725: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4673 "configure"
+#line 4730 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4708: checking for $ac_hdr" >&5
+echo "configure:4765: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4713 "configure"
+#line 4770 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4745: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4802: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4750 "configure"
+#line 4807 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4784: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4841: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4789 "configure"
+#line 4846 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4822: checking for opendir in -ldir" >&5
+echo "configure:4879: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4830 "configure"
+#line 4887 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4863: checking for opendir in -lx" >&5
+echo "configure:4920: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4871 "configure"
+#line 4928 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4907: checking for $ac_func" >&5
+echo "configure:4964: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4912 "configure"
+#line 4969 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in strtoull
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4962: checking for $ac_func" >&5
+echo "configure:5019: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4967 "configure"
+#line 5024 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:5025: checking whether strstr must be declared" >&5
+echo "configure:5082: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5030 "configure"
+#line 5087 "configure"
#include "confdefs.h"
#include <stdio.h>
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:5051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:5072: checking whether malloc must be declared" >&5
+echo "configure:5129: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5077 "configure"
+#line 5134 "configure"
#include "confdefs.h"
#include <stdio.h>
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:5098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:5119: checking whether realloc must be declared" >&5
+echo "configure:5176: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5124 "configure"
+#line 5181 "configure"
#include "confdefs.h"
#include <stdio.h>
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:5166: checking whether free must be declared" >&5
+echo "configure:5223: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5171 "configure"
+#line 5228 "configure"
#include "confdefs.h"
#include <stdio.h>
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:5192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5213: checking whether getenv must be declared" >&5
+echo "configure:5270: checking whether getenv must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5218 "configure"
+#line 5275 "configure"
#include "confdefs.h"
#include <stdio.h>
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:5239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
# have c_impl as a member of struct core_dumpx
echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
-echo "configure:5415: checking for c_impl in struct core_dumpx" >&5
+echo "configure:5472: checking for c_impl in struct core_dumpx" >&5
cat > conftest.$ac_ext <<EOF
-#line 5417 "configure"
+#line 5474 "configure"
#include "confdefs.h"
#include <core.h>
int main() {
struct core_dumpx c; c.c_impl = 0;
; return 0; }
EOF
-if { (eval echo configure:5424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_ST_C_IMPL 1
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5501: checking for $ac_hdr" >&5
+echo "configure:5558: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5506 "configure"
+#line 5563 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5539: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5596: checking for prstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5544 "configure"
+#line 5601 "configure"
#include "confdefs.h"
#define _SYSCALL32
prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5575: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5632: checking for prstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5580 "configure"
+#line 5637 "configure"
#include "confdefs.h"
#define _SYSCALL32
prstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5611: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5668: checking for prstatus_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5616 "configure"
+#line 5673 "configure"
#include "confdefs.h"
#define _SYSCALL32
prstatus_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5647: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5704: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5652 "configure"
+#line 5709 "configure"
#include "confdefs.h"
#define _SYSCALL32
prstatus32_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5683: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5740: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5688 "configure"
+#line 5745 "configure"
#include "confdefs.h"
#define _SYSCALL32
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5719: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5776: checking for pxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5724 "configure"
+#line 5781 "configure"
#include "confdefs.h"
#define _SYSCALL32
pxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5755: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5812: checking for pstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5760 "configure"
+#line 5817 "configure"
#include "confdefs.h"
#define _SYSCALL32
pstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5791: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5848: checking for prpsinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5796 "configure"
+#line 5853 "configure"
#include "confdefs.h"
#define _SYSCALL32
prpsinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5827: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5884: checking for prpsinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5832 "configure"
+#line 5889 "configure"
#include "confdefs.h"
#define _SYSCALL32
prpsinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5863: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5920: checking for psinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5868 "configure"
+#line 5925 "configure"
#include "confdefs.h"
#define _SYSCALL32
psinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5899: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5956: checking for psinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5904 "configure"
+#line 5961 "configure"
#include "confdefs.h"
#define _SYSCALL32
psinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5935: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5992: checking for lwpstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5940 "configure"
+#line 5997 "configure"
#include "confdefs.h"
#define _SYSCALL32
lwpstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5971: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:6028: checking for lwpxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5976 "configure"
+#line 6033 "configure"
#include "confdefs.h"
#define _SYSCALL32
lwpxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6007: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:6064: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6012 "configure"
+#line 6069 "configure"
#include "confdefs.h"
#define _SYSCALL32
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
; return 0; }
EOF
-if { (eval echo configure:6021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6043: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:6100: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6048 "configure"
+#line 6105 "configure"
#include "confdefs.h"
#define _SYSCALL32
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
; return 0; }
EOF
-if { (eval echo configure:6057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6079: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:6136: checking for win32_pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6084 "configure"
+#line 6141 "configure"
#include "confdefs.h"
#define _SYSCALL32
win32_pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:6093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
+ bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6564: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6622: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
-#line 6567 "configure"
+#line 6625 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
for ac_func in ftello ftello64 fseeko fseeko64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6609: checking for $ac_func" >&5
+echo "configure:6667: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6614 "configure"
+#line 6672 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
echo $ac_n "checking size of off_t""... $ac_c" 1>&6
-echo "configure:6663: checking size of off_t" >&5
+echo "configure:6721: checking size of off_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 6669 "configure"
+#line 6727 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (off_t) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:6679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_off_t=$ac_size
else
fi
echo $ac_n "checking file_ptr type""... $ac_c" 1>&6
-echo "configure:6703: checking file_ptr type" >&5
+echo "configure:6761: checking file_ptr type" >&5
bfd_file_ptr="long"
bfd_ufile_ptr="unsigned long"
if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6728: checking for $ac_hdr" >&5
+echo "configure:6786: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6733 "configure"
+#line 6791 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6767: checking for $ac_func" >&5
+echo "configure:6825: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6772 "configure"
+#line 6830 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6820: checking for working mmap" >&5
+echo "configure:6878: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6828 "configure"
+#line 6886 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
}
EOF
-if { (eval echo configure:6968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6993: checking for $ac_func" >&5
+echo "configure:7064: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6998 "configure"
+#line 7069 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
};
#endif
+extern const bfd_target bfd_elf32_frvfdpic_vec;
+#define IS_FDPIC(bfd) ((bfd)->xvec == &bfd_elf32_frvfdpic_vec)
/* An extension of the elf hash table data structure, containing some
additional FRV-specific data. */
-struct frv_elf_link_hash_table
+struct frvfdpic_elf_link_hash_table
{
struct elf_link_hash_table elf;
/* Get the FRV ELF linker hash table from a link_info structure. */
-#define frv_hash_table(info) \
- ((struct frv_elf_link_hash_table *) ((info)->hash))
-
-#define frv_got_section(info) \
- (frv_hash_table (info)->sgot)
-#define frv_gotrel_section(info) \
- (frv_hash_table (info)->sgotrel)
-#define frv_gotfixup_section(info) \
- (frv_hash_table (info)->sgotfixup)
-#define frv_plt_section(info) \
- (frv_hash_table (info)->splt)
-#define frv_pltrel_section(info) \
- (frv_hash_table (info)->spltrel)
-#define frv_relocs_info(info) \
- (frv_hash_table (info)->relocs_info)
-#define frv_got_initial_offset(info) \
- (frv_hash_table (info)->got0)
-#define frv_plt_initial_offset(info) \
- (frv_hash_table (info)->plt0)
+#define frvfdpic_hash_table(info) \
+ ((struct frvfdpic_elf_link_hash_table *) ((info)->hash))
+
+#define frvfdpic_got_section(info) \
+ (frvfdpic_hash_table (info)->sgot)
+#define frvfdpic_gotrel_section(info) \
+ (frvfdpic_hash_table (info)->sgotrel)
+#define frvfdpic_gotfixup_section(info) \
+ (frvfdpic_hash_table (info)->sgotfixup)
+#define frvfdpic_plt_section(info) \
+ (frvfdpic_hash_table (info)->splt)
+#define frvfdpic_pltrel_section(info) \
+ (frvfdpic_hash_table (info)->spltrel)
+#define frvfdpic_relocs_info(info) \
+ (frvfdpic_hash_table (info)->relocs_info)
+#define frvfdpic_got_initial_offset(info) \
+ (frvfdpic_hash_table (info)->got0)
+#define frvfdpic_plt_initial_offset(info) \
+ (frvfdpic_hash_table (info)->plt0)
/* Create an FRV ELF linker hash table. */
static struct bfd_link_hash_table *
-frv_elf_link_hash_table_create (bfd *abfd)
+frvfdpic_elf_link_hash_table_create (bfd *abfd)
{
- struct frv_elf_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct frv_elf_link_hash_table);
+ struct frvfdpic_elf_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct frvfdpic_elf_link_hash_table);
ret = bfd_zalloc (abfd, amt);
if (ret == NULL)
/* Decide whether a reference to a symbol can be resolved locally or
not. If the symbol is protected, we want the local address, but
its function descriptor must be assigned by the dynamic linker. */
-#define FRV_SYM_LOCAL(INFO, H) \
+#define FRVFDPIC_SYM_LOCAL(INFO, H) \
(_bfd_elf_symbol_refs_local_p ((H), (INFO), 1) \
|| ! elf_hash_table (INFO)->dynamic_sections_created \
|| (/* The condition below is an ugly hack to get .scommon data to
|| (H)->root.type == bfd_link_hash_defweak) \
&& (H)->root.u.def.section->output_section \
&& ((H)->root.u.def.section->flags & SEC_LINKER_CREATED)))
-#define FRV_FUNCDESC_LOCAL(INFO, H) \
+#define FRVFDPIC_FUNCDESC_LOCAL(INFO, H) \
((H)->dynindx == -1 || ! elf_hash_table (INFO)->dynamic_sections_created)
/* This structure collects information on what kind of GOT, PLT or
function descriptors are required by relocations that reference a
certain symbol. */
-struct frv_pic_relocs_info
+struct frvfdpic_relocs_info
{
/* The index of the symbol, as stored in the relocation r_info, if
we have a local symbol; -1 otherwise. */
unsigned sym:1;
/* Whether we need a PLT entry for a symbol. Should be implied by
something like:
- (call && symndx == -1 && ! FRV_SYM_LOCAL (info, d.h)) */
+ (call && symndx == -1 && ! FRVFDPIC_SYM_LOCAL (info, d.h)) */
unsigned plt:1;
/* Whether a function descriptor should be created in this link unit
for symbol+addend. Should be implied by something like:
(plt || fdgotoff12 || fdgotofflos || fdgotofflohi
|| ((fd || fdgot12 || fdgotlos || fdgothilo)
- && (symndx != -1 || FRV_FUNCDESC_LOCAL (info, d.h)))) */
+ && (symndx != -1 || FRVFDPIC_FUNCDESC_LOCAL (info, d.h)))) */
unsigned privfd:1;
/* Whether a lazy PLT entry is needed for this symbol+addend.
Should be implied by something like:
- (privfd && symndx == -1 && ! FRV_SYM_LOCAL (info, d.h)
+ (privfd && symndx == -1 && ! FRVFDPIC_SYM_LOCAL (info, d.h)
&& ! (info->flags & DF_BIND_NOW)) */
unsigned lazyplt:1;
/* Whether we've already emitted GOT relocations and PLT entries as
bfd_vma plt_entry, lzplt_entry;
};
-/* Compute a hash with the key fields of an frv_pic_relocs_info entry. */
+/* Compute a hash with the key fields of an frvfdpic_relocs_info entry. */
static hashval_t
-frv_pic_relocs_info_hash (const void *entry_)
+frvfdpic_relocs_info_hash (const void *entry_)
{
- const struct frv_pic_relocs_info *entry = entry_;
+ const struct frvfdpic_relocs_info *entry = entry_;
return (entry->symndx == -1
? entry->d.h->root.root.hash
: entry->symndx + entry->d.abfd->id * 257) + entry->addend;
}
-/* Test whether the key fields of two frv_pic_relocs_info entries are
+/* Test whether the key fields of two frvfdpic_relocs_info entries are
identical. */
static int
-frv_pic_relocs_info_eq (const void *entry1, const void *entry2)
+frvfdpic_relocs_info_eq (const void *entry1, const void *entry2)
{
- const struct frv_pic_relocs_info *e1 = entry1;
- const struct frv_pic_relocs_info *e2 = entry2;
+ const struct frvfdpic_relocs_info *e1 = entry1;
+ const struct frvfdpic_relocs_info *e2 = entry2;
return e1->symndx == e2->symndx && e1->addend == e2->addend
&& (e1->symndx == -1 ? e1->d.h == e2->d.h : e1->d.abfd == e2->d.abfd);
/* Find or create an entry in a hash table HT that matches the key
fields of the given ENTRY. If it's not found, memory for a new
entry is allocated in ABFD's obstack. */
-static struct frv_pic_relocs_info *
-frv_pic_relocs_info_find (struct htab *ht,
- bfd *abfd,
- const struct frv_pic_relocs_info *entry,
- enum insert_option insert)
+static struct frvfdpic_relocs_info *
+frvfdpic_relocs_info_find (struct htab *ht,
+ bfd *abfd,
+ const struct frvfdpic_relocs_info *entry,
+ enum insert_option insert)
{
- struct frv_pic_relocs_info **loc =
- (struct frv_pic_relocs_info **) htab_find_slot (ht, entry, insert);
+ struct frvfdpic_relocs_info **loc =
+ (struct frvfdpic_relocs_info **) htab_find_slot (ht, entry, insert);
if (! loc)
return NULL;
/* Obtain the address of the entry in HT associated with H's symbol +
addend, creating a new entry if none existed. ABFD is only used
for memory allocation purposes. */
-inline static struct frv_pic_relocs_info *
-frv_pic_relocs_info_for_global (struct htab *ht,
- bfd *abfd,
- struct elf_link_hash_entry *h,
- bfd_vma addend,
- enum insert_option insert)
+inline static struct frvfdpic_relocs_info *
+frvfdpic_relocs_info_for_global (struct htab *ht,
+ bfd *abfd,
+ struct elf_link_hash_entry *h,
+ bfd_vma addend,
+ enum insert_option insert)
{
- struct frv_pic_relocs_info entry;
+ struct frvfdpic_relocs_info entry;
entry.symndx = -1;
entry.d.h = h;
entry.addend = addend;
- return frv_pic_relocs_info_find (ht, abfd, &entry, insert);
+ return frvfdpic_relocs_info_find (ht, abfd, &entry, insert);
}
/* Obtain the address of the entry in HT associated with the SYMNDXth
local symbol of the input bfd ABFD, plus the addend, creating a new
entry if none existed. */
-inline static struct frv_pic_relocs_info *
-frv_pic_relocs_info_for_local (struct htab *ht,
- bfd *abfd,
- long symndx,
- bfd_vma addend,
- enum insert_option insert)
+inline static struct frvfdpic_relocs_info *
+frvfdpic_relocs_info_for_local (struct htab *ht,
+ bfd *abfd,
+ long symndx,
+ bfd_vma addend,
+ enum insert_option insert)
{
- struct frv_pic_relocs_info entry;
+ struct frvfdpic_relocs_info entry;
entry.symndx = symndx;
entry.d.abfd = abfd;
entry.addend = addend;
- return frv_pic_relocs_info_find (ht, abfd, &entry, insert);
+ return frvfdpic_relocs_info_find (ht, abfd, &entry, insert);
}
/* Merge fields set by check_relocs() of two entries that end up being
mapped to the same (presumably global) symbol. */
inline static void
-frv_pic_merge_early_relocs_info (struct frv_pic_relocs_info *e2,
- struct frv_pic_relocs_info const *e1)
+frvfdpic_pic_merge_early_relocs_info (struct frvfdpic_relocs_info *e2,
+ struct frvfdpic_relocs_info const *e1)
{
e2->got12 |= e1->got12;
e2->gotlos |= e1->gotlos;
e2->sym |= e1->sym;
#if 0
- /* These are set in _frv_count_got_plt_entries() or later, and this
- function is only called in _frv_resolve_final_relocs_info(), that
+ /* These are set in _frvfdpic_count_got_plt_entries() or later, and this
+ function is only called in _frvfdpic_resolve_final_relocs_info(), that
runs just before it, so we don't have to worry about the fields
below. */
32767, counting from 0). All other lazy PLT entries branch to it
in a single instruction. */
-#define FRV_LZPLT_BLOCK_SIZE ((bfd_vma) 8 * 65535 + 4)
-#define FRV_LZPLT_RESOLV_LOC (8 * 32767)
+#define FRVFDPIC_LZPLT_BLOCK_SIZE ((bfd_vma) 8 * 65535 + 4)
+#define FRVFDPIC_LZPLT_RESOLV_LOC (8 * 32767)
/* Add a dynamic relocation to the SRELOC section. */
inline static bfd_vma
-_frv_add_dyn_reloc (bfd *output_bfd, asection *sreloc, bfd_vma offset,
- int reloc_type, long dynindx, bfd_vma addend,
- struct frv_pic_relocs_info *entry)
+_frvfdpic_add_dyn_reloc (bfd *output_bfd, asection *sreloc, bfd_vma offset,
+ int reloc_type, long dynindx, bfd_vma addend,
+ struct frvfdpic_relocs_info *entry)
{
Elf_Internal_Rela outrel;
bfd_vma reloc_offset;
/* Add a fixup to the ROFIXUP section. */
static bfd_vma
-_frv_add_rofixup (bfd *output_bfd, asection *rofixup, bfd_vma offset,
- struct frv_pic_relocs_info *entry)
+_frvfdpic_add_rofixup (bfd *output_bfd, asection *rofixup, bfd_vma offset,
+ struct frvfdpic_relocs_info *entry)
{
bfd_vma fixup_offset;
located. */
static unsigned
-_frv_osec_to_segment (bfd *output_bfd, asection *osec)
+_frvfdpic_osec_to_segment (bfd *output_bfd, asection *osec)
{
struct elf_segment_map *m;
Elf_Internal_Phdr *p;
}
inline static bfd_boolean
-_frv_osec_readonly_p (bfd *output_bfd, asection *osec)
+_frvfdpic_osec_readonly_p (bfd *output_bfd, asection *osec)
{
- unsigned seg = _frv_osec_to_segment (output_bfd, osec);
+ unsigned seg = _frvfdpic_osec_to_segment (output_bfd, osec);
return ! (elf_tdata (output_bfd)->phdr[seg].p_flags & PF_W);
}
code for PLT and lazy PLT entries. */
inline static bfd_boolean
-_frv_emit_got_relocs_plt_entries (struct frv_pic_relocs_info *entry,
- bfd *output_bfd,
- struct bfd_link_info *info,
- asection *sec,
- Elf_Internal_Sym *sym,
- bfd_vma addend)
+_frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry,
+ bfd *output_bfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ Elf_Internal_Sym *sym,
+ bfd_vma addend)
{
bfd_vma fd_lazy_rel_offset = (bfd_vma)-1;
/* If the symbol is dynamic but binds locally, use
section+offset. */
- if (sec && (entry->symndx != -1 || FRV_SYM_LOCAL (info, entry->d.h)))
+ if (sec && (entry->symndx != -1
+ || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
if (entry->symndx == -1)
ad += entry->d.h->root.u.def.value;
omit the dynamic relocation as long as the symbol is local to
this module. */
if (info->executable && !info->pie
- && (entry->symndx != -1 || FRV_SYM_LOCAL (info, entry->d.h)))
+ && (entry->symndx != -1
+ || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
if (sec)
ad += sec->output_section->vma;
if (entry->symndx != -1
|| entry->d.h->root.type != bfd_link_hash_undefweak)
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
- + entry->got_entry, entry);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section (info),
+ frvfdpic_got_section (info)->output_section
+ ->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info)
+ + entry->got_entry, entry);
}
else
- _frv_add_dyn_reloc (output_bfd, frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- frv_got_section (info),
- frv_got_initial_offset (info)
- + entry->got_entry)
- + frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset,
- R_FRV_32, idx, ad, entry);
+ _frvfdpic_add_dyn_reloc (output_bfd, frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ frvfdpic_got_section (info),
+ frvfdpic_got_initial_offset (info)
+ + entry->got_entry)
+ + frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)->output_offset,
+ R_FRV_32, idx, ad, entry);
bfd_put_32 (output_bfd, ad,
- frv_got_section (info)->contents
- + frv_got_initial_offset (info)
+ frvfdpic_got_section (info)->contents
+ + frvfdpic_got_initial_offset (info)
+ entry->got_entry);
}
if (! (entry->symndx == -1
&& entry->d.h->root.type == bfd_link_hash_undefweak
- && FRV_SYM_LOCAL (info, entry->d.h)))
+ && FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
/* If the symbol is dynamic and there may be dynamic symbol
resolution because we are, or are linked with, a shared
symbol needs a non-local function descriptor but binds
locally (e.g., its visibility is protected, emit a
dynamic relocation decayed to section+offset. */
- if (entry->symndx == -1 && ! FRV_FUNCDESC_LOCAL (info, entry->d.h)
- && FRV_SYM_LOCAL (info, entry->d.h)
+ if (entry->symndx == -1
+ && ! FRVFDPIC_FUNCDESC_LOCAL (info, entry->d.h)
+ && FRVFDPIC_SYM_LOCAL (info, entry->d.h)
&& !(info->executable && !info->pie))
{
reloc = R_FRV_FUNCDESC;
+ entry->d.h->root.u.def.value;
}
else if (entry->symndx == -1
- && ! FRV_FUNCDESC_LOCAL (info, entry->d.h))
+ && ! FRVFDPIC_FUNCDESC_LOCAL (info, entry->d.h))
{
reloc = R_FRV_FUNCDESC;
idx = dynindx;
if (elf_hash_table (info)->dynamic_sections_created)
BFD_ASSERT (entry->privfd);
reloc = R_FRV_32;
- idx = elf_section_data (frv_got_section (info)
+ idx = elf_section_data (frvfdpic_got_section (info)
->output_section)->dynindx;
- ad = frv_got_section (info)->output_offset
- + frv_got_initial_offset (info) + entry->fd_entry;
+ ad = frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info) + entry->fd_entry;
}
/* If there is room for dynamic symbol resolution, emit the
of the private descriptor ourselves. */
if (info->executable && !info->pie
&& (entry->symndx != -1
- || FRV_FUNCDESC_LOCAL (info, entry->d.h)))
+ || FRVFDPIC_FUNCDESC_LOCAL (info, entry->d.h)))
{
- ad += frv_got_section (info)->output_section->vma;
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
- + entry->fdgot_entry, entry);
+ ad += frvfdpic_got_section (info)->output_section->vma;
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section (info),
+ frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset
+ + frvfdpic_got_initial_offset (info)
+ + entry->fdgot_entry, entry);
}
else
- _frv_add_dyn_reloc (output_bfd, frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- frv_got_section (info),
- frv_got_initial_offset (info)
- + entry->fdgot_entry)
- + frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset,
- reloc, idx, ad, entry);
+ _frvfdpic_add_dyn_reloc (output_bfd,
+ frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ frvfdpic_got_section (info),
+ frvfdpic_got_initial_offset (info)
+ + entry->fdgot_entry)
+ + frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset,
+ reloc, idx, ad, entry);
}
bfd_put_32 (output_bfd, ad,
- frv_got_section (info)->contents
- + frv_got_initial_offset (info)
+ frvfdpic_got_section (info)->contents
+ + frvfdpic_got_initial_offset (info)
+ entry->fdgot_entry);
}
/* If the symbol is dynamic but binds locally, use
section+offset. */
- if (sec && (entry->symndx != -1 || FRV_SYM_LOCAL (info, entry->d.h)))
+ if (sec && (entry->symndx != -1
+ || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
if (entry->symndx == -1)
ad += entry->d.h->root.u.def.value;
omit the dynamic relocation as long as the symbol is local to
this module. */
if (info->executable && !info->pie
- && (entry->symndx != -1 || FRV_SYM_LOCAL (info, entry->d.h)))
+ && (entry->symndx != -1 || FRVFDPIC_SYM_LOCAL (info, entry->d.h)))
{
if (sec)
ad += sec->output_section->vma;
if (entry->symndx != -1
|| entry->d.h->root.type != bfd_link_hash_undefweak)
{
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
- + entry->fd_entry, entry);
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
- + entry->fd_entry + 4, entry);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section (info),
+ frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset
+ + frvfdpic_got_initial_offset (info)
+ + entry->fd_entry, entry);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section (info),
+ frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset
+ + frvfdpic_got_initial_offset (info)
+ + entry->fd_entry + 4, entry);
}
}
else
{
ofst =
- _frv_add_dyn_reloc (output_bfd,
- entry->lazyplt ? frv_pltrel_section (info)
- : frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- frv_got_section (info),
- frv_got_initial_offset (info)
- + entry->fd_entry)
- + frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset,
- R_FRV_FUNCDESC_VALUE, idx, ad, entry);
+ _frvfdpic_add_dyn_reloc (output_bfd,
+ entry->lazyplt
+ ? frvfdpic_pltrel_section (info)
+ : frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ frvfdpic_got_section (info),
+ frvfdpic_got_initial_offset (info)
+ + entry->fd_entry)
+ + frvfdpic_got_section (info)
+ ->output_section->vma
+ + frvfdpic_got_section (info)
+ ->output_offset,
+ R_FRV_FUNCDESC_VALUE, idx, ad, entry);
}
/* If we've omitted the dynamic relocation, just emit the fixed
if (info->executable && !info->pie && sec && sec->output_section)
{
lowword = ad;
- highword = frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info);
+ highword = frvfdpic_got_section (info)->output_section->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info);
}
else if (entry->lazyplt)
{
entry point, that must be within the memory region
assigned to that section. */
lowword = entry->lzplt_entry + 4
- + frv_plt_section (info)->output_offset
- + frv_plt_section (info)->output_section->vma;
- highword = _frv_osec_to_segment
- (output_bfd, frv_plt_section (info)->output_section);
+ + frvfdpic_plt_section (info)->output_offset
+ + frvfdpic_plt_section (info)->output_section->vma;
+ highword = _frvfdpic_osec_to_segment
+ (output_bfd, frvfdpic_plt_section (info)->output_section);
}
else
{
&& entry->d.h->dynindx == idx)
highword = 0;
else
- highword = _frv_osec_to_segment (output_bfd, sec->output_section);
+ highword = _frvfdpic_osec_to_segment
+ (output_bfd, sec->output_section);
}
bfd_put_32 (output_bfd, lowword,
- frv_got_section (info)->contents
- + frv_got_initial_offset (info)
+ frvfdpic_got_section (info)->contents
+ + frvfdpic_got_initial_offset (info)
+ entry->fd_entry);
bfd_put_32 (output_bfd, highword,
- frv_got_section (info)->contents
- + frv_got_initial_offset (info)
+ frvfdpic_got_section (info)->contents
+ + frvfdpic_got_initial_offset (info)
+ entry->fd_entry + 4);
}
/* Generate code for the PLT entry. */
if (entry->plt_entry != (bfd_vma) -1)
{
- bfd_byte *plt_code = frv_plt_section (info)->contents + entry->plt_entry;
+ bfd_byte *plt_code = frvfdpic_plt_section (info)->contents
+ + entry->plt_entry;
BFD_ASSERT (entry->fd_entry);
/* Generate code for the lazy PLT entry. */
if (entry->lzplt_entry != (bfd_vma) -1)
{
- bfd_byte *lzplt_code = frv_plt_section (info)->contents
+ bfd_byte *lzplt_code = frvfdpic_plt_section (info)->contents
+ entry->lzplt_entry;
bfd_vma resolverStub_addr;
bfd_put_32 (output_bfd, fd_lazy_rel_offset, lzplt_code);
lzplt_code += 4;
- resolverStub_addr = entry->lzplt_entry / FRV_LZPLT_BLOCK_SIZE
- * FRV_LZPLT_BLOCK_SIZE + FRV_LZPLT_RESOLV_LOC;
- if (resolverStub_addr >= frv_plt_initial_offset (info))
- resolverStub_addr = frv_plt_initial_offset (info) - 12;
+ resolverStub_addr = entry->lzplt_entry / FRVFDPIC_LZPLT_BLOCK_SIZE
+ * FRVFDPIC_LZPLT_BLOCK_SIZE + FRVFDPIC_LZPLT_RESOLV_LOC;
+ if (resolverStub_addr >= frvfdpic_plt_initial_offset (info))
+ resolverStub_addr = frvfdpic_plt_initial_offset (info) - 12;
if (entry->lzplt_entry == resolverStub_addr)
{
/* Set the howto pointer for an FRV ELF REL reloc. */
static void
-frv_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
- arelent *cache_ptr, Elf_Internal_Rela *dst)
+frvfdpic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr, Elf_Internal_Rela *dst)
{
unsigned int r_type;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
- isec_segment = _frv_osec_to_segment (output_bfd,
- input_section->output_section);
- if (frv_got_section (info))
- got_segment = _frv_osec_to_segment (output_bfd,
- frv_got_section (info)
- ->output_section);
+ isec_segment = _frvfdpic_osec_to_segment (output_bfd,
+ input_section->output_section);
+ if (IS_FDPIC (output_bfd) && frvfdpic_got_section (info))
+ got_segment = _frvfdpic_osec_to_segment (output_bfd,
+ frvfdpic_got_section (info)
+ ->output_section);
else
got_segment = -1;
- if (frv_gotfixup_section (info))
- gprel_segment = _frv_osec_to_segment (output_bfd,
- frv_gotfixup_section (info)
- ->output_section);
+ if (IS_FDPIC (output_bfd) && frvfdpic_gotfixup_section (info))
+ gprel_segment = _frvfdpic_osec_to_segment (output_bfd,
+ frvfdpic_gotfixup_section (info)
+ ->output_section);
else
gprel_segment = -1;
- if (elf_hash_table (info)->dynamic_sections_created)
- plt_segment = _frv_osec_to_segment (output_bfd,
- frv_plt_section (info)
- ->output_section);
+ if (IS_FDPIC (output_bfd) && elf_hash_table (info)->dynamic_sections_created)
+ plt_segment = _frvfdpic_osec_to_segment (output_bfd,
+ frvfdpic_plt_section (info)
+ ->output_section);
else
plt_segment = -1;
const char * name = NULL;
int r_type;
asection *osec;
- struct frv_pic_relocs_info *picrel;
+ struct frvfdpic_relocs_info *picrel;
bfd_vma orig_addend = rel->r_addend;
r_type = ELF32_R_TYPE (rel->r_info);
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
- && ! FRV_SYM_LOCAL (info, h))
+ && ! FRVFDPIC_SYM_LOCAL (info, h))
{
sec = NULL;
relocation = 0;
{
case R_FRV_LABEL24:
case R_FRV_32:
+ if (! IS_FDPIC (output_bfd))
+ goto non_fdpic;
+
case R_FRV_GOT12:
case R_FRV_GOTHI:
case R_FRV_GOTLO:
case R_FRV_FUNCDESC:
case R_FRV_FUNCDESC_VALUE:
if (h != NULL)
- picrel = frv_pic_relocs_info_for_global (frv_relocs_info (info),
- input_bfd, h,
- orig_addend, INSERT);
+ picrel = frvfdpic_relocs_info_for_global (frvfdpic_relocs_info
+ (info), input_bfd, h,
+ orig_addend, INSERT);
else
/* In order to find the entry we created before, we must
use the original addend, not the one that may have been
modified by _bfd_elf_rela_local_sym(). */
- picrel = frv_pic_relocs_info_for_local (frv_relocs_info (info),
- input_bfd, r_symndx,
- orig_addend, INSERT);
+ picrel = frvfdpic_relocs_info_for_local (frvfdpic_relocs_info
+ (info), input_bfd, r_symndx,
+ orig_addend, INSERT);
if (! picrel)
return FALSE;
- if (!_frv_emit_got_relocs_plt_entries (picrel, output_bfd, info,
- osec, sym, rel->r_addend))
+ if (!_frvfdpic_emit_got_relocs_plt_entries (picrel, output_bfd, info,
+ osec, sym,
+ rel->r_addend))
{
- info->callbacks->warning
- (info, _("Dynamic relocation references symbol with nonzero addend"),
- name, input_bfd, input_section, rel->r_offset);
+ (*_bfd_error_handler)
+ (_("%s: relocation at `%s+0x%x' references symbol `%s' with nonzero addend"),
+ bfd_archive_filename (input_bfd), input_section->name,
+ rel->r_offset, name);
return FALSE;
}
break;
default:
+ non_fdpic:
picrel = NULL;
- if (h && ! FRV_SYM_LOCAL (info, h))
+ if (h && ! FRVFDPIC_SYM_LOCAL (info, h))
{
info->callbacks->warning
(info, _("relocation references symbol not defined in the module"),
{
case R_FRV_LABEL24:
check_segment[0] = isec_segment;
- if (picrel->plt)
+ if (! IS_FDPIC (output_bfd))
+ check_segment[1] = isec_segment;
+ else if (picrel->plt)
{
- relocation = frv_plt_section (info)->output_section->vma
- + frv_plt_section (info)->output_offset
+ relocation = frvfdpic_plt_section (info)->output_section->vma
+ + frvfdpic_plt_section (info)->output_offset
+ picrel->plt_entry;
check_segment[1] = plt_segment;
}
check_segment[1] = check_segment[0];
else
check_segment[1] = sec
- ? _frv_osec_to_segment (output_bfd, sec->output_section)
+ ? _frvfdpic_osec_to_segment (output_bfd, sec->output_section)
: (unsigned)-1;
break;
case R_FRV_GOTOFFHI:
case R_FRV_GOTOFF12:
case R_FRV_GOTOFFLO:
- relocation -= frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info);
+ relocation -= frvfdpic_got_section (info)->output_section->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info);
check_segment[0] = got_segment;
check_segment[1] = sec
- ? _frv_osec_to_segment (output_bfd, sec->output_section)
+ ? _frvfdpic_osec_to_segment (output_bfd, sec->output_section)
: (unsigned)-1;
break;
bfd_vma addend = rel->r_addend;
if (! (h && h->root.type == bfd_link_hash_undefweak
- && FRV_SYM_LOCAL (info, h)))
+ && FRVFDPIC_SYM_LOCAL (info, h)))
{
/* If the symbol is dynamic and there may be dynamic
symbol resolution because we are or are linked with a
descriptor but binds locally (e.g., its visibility is
protected, emit a dynamic relocation decayed to
section+offset. */
- if (h && ! FRV_FUNCDESC_LOCAL (info, h)
- && FRV_SYM_LOCAL (info, h)
+ if (h && ! FRVFDPIC_FUNCDESC_LOCAL (info, h)
+ && FRVFDPIC_SYM_LOCAL (info, h)
&& !(info->executable && !info->pie))
{
dynindx = elf_section_data (h->root.u.def.section
addend += h->root.u.def.section->output_offset
+ h->root.u.def.value;
}
- else if (h && ! FRV_FUNCDESC_LOCAL (info, h))
+ else if (h && ! FRVFDPIC_FUNCDESC_LOCAL (info, h))
{
if (addend)
{
descriptor, so reference it directly. */
BFD_ASSERT (picrel->privfd);
r_type = R_FRV_32;
- dynindx = elf_section_data (frv_got_section (info)
+ dynindx = elf_section_data (frvfdpic_got_section (info)
->output_section)->dynindx;
- addend = frv_got_section (info)->output_offset
- + frv_got_initial_offset (info)
+ addend = frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info)
+ picrel->fd_entry;
}
be zero, which means we can and should compute the
address of the private descriptor ourselves. */
if (info->executable && !info->pie
- && (!h || FRV_FUNCDESC_LOCAL (info, h)))
+ && (!h || FRVFDPIC_FUNCDESC_LOCAL (info, h)))
{
- addend += frv_got_section (info)->output_section->vma;
+ addend += frvfdpic_got_section (info)->output_section->vma;
if ((bfd_get_section_flags (output_bfd,
input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
- if (_frv_osec_readonly_p (output_bfd,
- input_section->output_section))
+ if (_frvfdpic_osec_readonly_p (output_bfd,
+ input_section
+ ->output_section))
{
info->callbacks->warning
(info,
name, input_bfd, input_section, rel->r_offset);
return FALSE;
}
- _frv_add_rofixup (output_bfd,
- frv_gotfixup_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- input_section, rel->r_offset)
- + input_section->output_section->vma
- + input_section->output_offset,
- picrel);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section
+ (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ input_section, rel->r_offset)
+ + input_section
+ ->output_section->vma
+ + input_section->output_offset,
+ picrel);
}
}
else if ((bfd_get_section_flags (output_bfd,
input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
- if (_frv_osec_readonly_p (output_bfd,
- input_section->output_section))
+ if (_frvfdpic_osec_readonly_p (output_bfd,
+ input_section
+ ->output_section))
{
info->callbacks->warning
(info,
name, input_bfd, input_section, rel->r_offset);
return FALSE;
}
- _frv_add_dyn_reloc (output_bfd, frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- input_section, rel->r_offset)
- + input_section->output_section->vma
- + input_section->output_offset,
- r_type, dynindx, addend, picrel);
+ _frvfdpic_add_dyn_reloc (output_bfd,
+ frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ input_section, rel->r_offset)
+ + input_section
+ ->output_section->vma
+ + input_section->output_offset,
+ r_type, dynindx, addend, picrel);
}
+ else
+ addend += frvfdpic_got_section (info)->output_section->vma;
}
/* We want the addend in-place because dynamic
break;
case R_FRV_32:
+ if (! IS_FDPIC (output_bfd))
+ {
+ check_segment[0] = check_segment[1] = -1;
+ break;
+ }
+ /* Fall through. */
case R_FRV_FUNCDESC_VALUE:
{
int dynindx;
/* If the symbol is dynamic but binds locally, use
section+offset. */
- if (h && ! FRV_SYM_LOCAL (info, h))
+ if (h && ! FRVFDPIC_SYM_LOCAL (info, h))
{
if (addend && r_type == R_FRV_FUNCDESC_VALUE)
{
is defined in the current link unit (which is implied
by its output section not being NULL). */
if (info->executable && !info->pie
- && (!h || FRV_SYM_LOCAL (info, h)))
+ && (!h || FRVFDPIC_SYM_LOCAL (info, h)))
{
if (osec)
addend += osec->output_section->vma;
- if ((elf_elfheader (input_bfd)->e_flags & EF_FRV_FDPIC)
+ if (IS_FDPIC (input_bfd)
&& (bfd_get_section_flags (output_bfd,
input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
- if (_frv_osec_readonly_p (output_bfd,
- input_section->output_section))
+ if (_frvfdpic_osec_readonly_p (output_bfd,
+ input_section
+ ->output_section))
{
info->callbacks->warning
(info,
}
if (!h || h->root.type != bfd_link_hash_undefweak)
{
- _frv_add_rofixup (output_bfd,
- frv_gotfixup_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- input_section, rel->r_offset)
- + input_section->output_section->vma
- + input_section->output_offset,
- picrel);
+ _frvfdpic_add_rofixup (output_bfd,
+ frvfdpic_gotfixup_section
+ (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ input_section, rel->r_offset)
+ + input_section
+ ->output_section->vma
+ + input_section->output_offset,
+ picrel);
if (r_type == R_FRV_FUNCDESC_VALUE)
- _frv_add_rofixup
+ _frvfdpic_add_rofixup
(output_bfd,
- frv_gotfixup_section (info),
+ frvfdpic_gotfixup_section (info),
_bfd_elf_section_offset
(output_bfd, info,
input_section, rel->r_offset)
input_section->output_section)
& (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
{
- if (_frv_osec_readonly_p (output_bfd,
- input_section->output_section))
+ if (_frvfdpic_osec_readonly_p (output_bfd,
+ input_section
+ ->output_section))
{
info->callbacks->warning
(info,
name, input_bfd, input_section, rel->r_offset);
return FALSE;
}
- _frv_add_dyn_reloc (output_bfd, frv_gotrel_section (info),
- _bfd_elf_section_offset
- (output_bfd, info,
- input_section, rel->r_offset)
- + input_section->output_section->vma
- + input_section->output_offset,
- r_type, dynindx, addend, picrel);
+ _frvfdpic_add_dyn_reloc (output_bfd,
+ frvfdpic_gotrel_section (info),
+ _bfd_elf_section_offset
+ (output_bfd, info,
+ input_section, rel->r_offset)
+ + input_section
+ ->output_section->vma
+ + input_section->output_offset,
+ r_type, dynindx, addend, picrel);
}
+ else if (osec)
+ addend += osec->output_section->vma;
/* We want the addend in-place because dynamic
relocations are REL. Setting relocation to it
should arrange for it to be installed. */
the fixed addresses of the symbol and of the local
GOT base offset. */
if (info->executable && !info->pie
- && (!h || FRV_SYM_LOCAL (info, h)))
+ && (!h || FRVFDPIC_SYM_LOCAL (info, h)))
bfd_put_32 (output_bfd,
- frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info),
+ frvfdpic_got_section (info)->output_section->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info),
contents + rel->r_offset + 4);
else
/* A function descriptor used for lazy or local
contains the offset of the lazy PLT entry entry
point into that section. */
bfd_put_32 (output_bfd,
- h && ! FRV_SYM_LOCAL (info, h)
+ h && ! FRVFDPIC_SYM_LOCAL (info, h)
? 0
- : _frv_osec_to_segment (output_bfd,
- sec->output_section),
+ : _frvfdpic_osec_to_segment (output_bfd,
+ sec
+ ->output_section),
contents + rel->r_offset + 4);
}
}
case R_FRV_GPRELLO:
check_segment[0] = gprel_segment;
check_segment[1] = sec
- ? _frv_osec_to_segment (output_bfd, sec->output_section)
+ ? _frvfdpic_osec_to_segment (output_bfd, sec->output_section)
: (unsigned)-1;
break;
default:
check_segment[0] = isec_segment;
check_segment[1] = sec
- ? _frv_osec_to_segment (output_bfd, sec->output_section)
+ ? _frvfdpic_osec_to_segment (output_bfd, sec->output_section)
: (unsigned)-1;
break;
}
- if (check_segment[0] != check_segment[1]
- && (elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC))
+ if (check_segment[0] != check_segment[1] && IS_FDPIC (output_bfd))
{
-#if 1
+#if 1 /* If you take this out, remove the #error from fdpic-static-6.d
+ in the ld testsuite. */
/* This helps catch problems in GCC while we can't do more
than static linking. The idea is to test whether the
input file basename is crt0.o only once. */
switch (r_type)
{
case R_FRV_LABEL24:
- if (! picrel->plt)
+ if (! IS_FDPIC (output_bfd) || ! picrel->plt)
break;
/* Fall through. */
return TRUE;
}
-/* Create a .got section, as well as its additional info field. This
+
+/* Create a .got section, as well as its additional info field. This
is almost entirely copied from
elflink.c:_bfd_elf_create_got_section(). */
struct bfd_link_hash_entry *bh;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
+ int offset;
/* This function may be called more than once. */
s = bfd_get_section_by_name (abfd, ".got");
/* This is the machine-specific part. Create and initialize section
data for the got. */
- frv_got_section (info) = s;
- frv_relocs_info (info) = htab_try_create (1, frv_pic_relocs_info_hash,
- frv_pic_relocs_info_eq,
- (htab_del) NULL);
- if (! frv_relocs_info (info))
- return FALSE;
+ if (IS_FDPIC (abfd))
+ {
+ frvfdpic_got_section (info) = s;
+ frvfdpic_relocs_info (info) = htab_try_create (1, frvfdpic_relocs_info_hash,
+ frvfdpic_relocs_info_eq,
+ (htab_del) NULL);
+ if (! frvfdpic_relocs_info (info))
+ return FALSE;
- s = bfd_make_section (abfd, ".rel.got");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, (flags | SEC_READONLY))
- || ! bfd_set_section_alignment (abfd, s, 2))
- return FALSE;
+ s = bfd_make_section (abfd, ".rel.got");
+ if (s == NULL
+ || ! bfd_set_section_flags (abfd, s, (flags | SEC_READONLY))
+ || ! bfd_set_section_alignment (abfd, s, 2))
+ return FALSE;
- frv_gotrel_section (info) = s;
+ frvfdpic_gotrel_section (info) = s;
- /* Machine-specific. */
- s = bfd_make_section (abfd, ".rofixup");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, (flags | SEC_READONLY))
- || ! bfd_set_section_alignment (abfd, s, 2))
- return FALSE;
+ /* Machine-specific. */
+ s = bfd_make_section (abfd, ".rofixup");
+ if (s == NULL
+ || ! bfd_set_section_flags (abfd, s, (flags | SEC_READONLY))
+ || ! bfd_set_section_alignment (abfd, s, 2))
+ return FALSE;
- frv_gotfixup_section (info) = s;
+ frvfdpic_gotfixup_section (info) = s;
+ offset = -2048;
+ flags = BSF_GLOBAL;
+ }
+ else
+ {
+ offset = 2048;
+ flags = BSF_GLOBAL | BSF_WEAK;
+ }
- /* Define _gp in .rofixup, for FDPIC. If it turns out that
- we're linking with a different linker script, the linker script
- will override it. */
+ /* Define _gp in .rofixup, for FDPIC, or .got otherwise. If it
+ turns out that we're linking with a different linker script, the
+ linker script will override it. */
bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "_gp", BSF_GLOBAL, s, -2048, (const char *) NULL, FALSE,
+ (info, abfd, "_gp", flags, s, offset, (const char *) NULL, FALSE,
bed->collect, &bh)))
return FALSE;
h = (struct elf_link_hash_entry *) bh;
h->type = STT_OBJECT;
/* Machine-specific: we want the symbol for executables as well. */
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ if (IS_FDPIC (abfd) && ! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
-
+
return TRUE;
}
the link hash table point to them. */
static bfd_boolean
-elf32_frv_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
+elf32_frvfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
/* This is mostly copied from
elflink.c:_bfd_elf_create_dynamic_sections(). */
|| ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
return FALSE;
/* FRV-specific: remember it. */
- frv_plt_section (info) = s;
+ frvfdpic_plt_section (info) = s;
if (bed->want_plt_sym)
{
|| ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
return FALSE;
/* FRV-specific: remember it. */
- frv_pltrel_section (info) = s;
+ frvfdpic_pltrel_section (info) = s;
/* FRV-specific: we want to create the GOT in the FRV way. */
if (! _frv_create_got_section (abfd, info))
return FALSE;
/* FRV-specific: make sure we created everything we wanted. */
- BFD_ASSERT (frv_got_section (info) && frv_gotrel_section (info)
- && frv_gotfixup_section (info)
- && frv_plt_section (info) && frv_pltrel_section (info));
+ BFD_ASSERT (frvfdpic_got_section (info) && frvfdpic_gotrel_section (info)
+ && frvfdpic_gotfixup_section (info)
+ && frvfdpic_plt_section (info)
+ && frvfdpic_pltrel_section (info));
if (bed->want_dynbss)
{
/* This structure is used to collect the number of entries present in
each addressable range of the got. */
-struct _frv_dynamic_got_info
+struct _frvfdpic_dynamic_got_info
{
/* Several bits of information about the current link. */
struct bfd_link_info *info;
private function descriptors taking two words. */
static int
-_frv_count_got_plt_entries (void **entryp, void *dinfo_)
+_frvfdpic_count_got_plt_entries (void **entryp, void *dinfo_)
{
- struct frv_pic_relocs_info *entry = *entryp;
- struct _frv_dynamic_got_info *dinfo = dinfo_;
+ struct frvfdpic_relocs_info *entry = *entryp;
+ struct _frvfdpic_dynamic_got_info *dinfo = dinfo_;
unsigned relocs = 0, fixups = 0;
/* Allocate space for a GOT entry pointing to the symbol. */
/* Decide whether we need a PLT entry, a function descriptor in the
GOT, and a lazy PLT entry for this symbol. */
entry->plt = entry->call
- && entry->symndx == -1 && ! FRV_SYM_LOCAL (dinfo->info, entry->d.h)
+ && entry->symndx == -1 && ! FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h)
&& elf_hash_table (dinfo->info)->dynamic_sections_created;
entry->privfd = entry->plt
|| entry->fdgoff12 || entry->fdgofflos || entry->fdgoffhilo
|| ((entry->fd || entry->fdgot12 || entry->fdgotlos || entry->fdgothilo)
&& (entry->symndx != -1
- || FRV_FUNCDESC_LOCAL (dinfo->info, entry->d.h)));
+ || FRVFDPIC_FUNCDESC_LOCAL (dinfo->info, entry->d.h)));
entry->lazyplt = entry->privfd
- && entry->symndx == -1 && ! FRV_SYM_LOCAL (dinfo->info, entry->d.h)
+ && entry->symndx == -1 && ! FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h)
&& ! (dinfo->info->flags & DF_BIND_NOW)
&& elf_hash_table (dinfo->info)->dynamic_sections_created;
relocs = entry->relocs32 + entry->relocsfd + entry->relocsfdv;
else
{
- if (entry->symndx != -1 || FRV_SYM_LOCAL (dinfo->info, entry->d.h))
+ if (entry->symndx != -1 || FRVFDPIC_SYM_LOCAL (dinfo->info, entry->d.h))
{
if (entry->symndx != -1
|| entry->d.h->root.type != bfd_link_hash_undefweak)
else
relocs += entry->relocs32 + entry->relocsfdv;
- if (entry->symndx != -1 || FRV_FUNCDESC_LOCAL (dinfo->info, entry->d.h))
+ if (entry->symndx != -1
+ || FRVFDPIC_FUNCDESC_LOCAL (dinfo->info, entry->d.h))
{
if (entry->symndx != -1
|| entry->d.h->root.type != bfd_link_hash_undefweak)
/* This structure is used to assign offsets to got entries, function
descriptors, plt entries and lazy plt entries. */
-struct _frv_dynamic_got_plt_info
+struct _frvfdpic_dynamic_got_plt_info
{
- /* Summary information collected with _frv_count_got_plt_entries. */
- struct _frv_dynamic_got_info g;
+ /* Summary information collected with _frvfdpic_count_got_plt_entries. */
+ struct _frvfdpic_dynamic_got_info g;
/* For each addressable range, we record a MAX (positive) and MIN
(negative) value. CUR is used to assign got entries, and it's
descriptor is chosen. FDPLT indicates the number of remaining
slots that can be used for function descriptors used only by PLT
entries. */
- struct _frv_dynamic_got_alloc_data
+ struct _frvfdpic_dynamic_got_alloc_data
{
bfd_signed_vma max, cur, odd, fdcur, min;
bfd_vma fdplt;
descriptors. */
inline static bfd_signed_vma
-_frv_compute_got_alloc_data (struct _frv_dynamic_got_alloc_data *gad,
- bfd_signed_vma fdcur,
- bfd_signed_vma odd,
- bfd_signed_vma cur,
- bfd_vma got,
- bfd_vma fd,
- bfd_vma fdplt,
- bfd_vma wrap)
+_frvfdpic_compute_got_alloc_data (struct _frvfdpic_dynamic_got_alloc_data *gad,
+ bfd_signed_vma fdcur,
+ bfd_signed_vma odd,
+ bfd_signed_vma cur,
+ bfd_vma got,
+ bfd_vma fd,
+ bfd_vma fdplt,
+ bfd_vma wrap)
{
bfd_signed_vma wrapmin = -wrap;
if (odd > gad->max)
odd = gad->min + odd - gad->max;
- /* _frv_get_got_entry() below will always wrap gad->cur if needed
+ /* _frvfdpic_get_got_entry() below will always wrap gad->cur if needed
before returning, so do it here too. This guarantees that,
should cur and fdcur meet at the wrap point, they'll both be
equal to min. */
data for a range. */
inline static bfd_signed_vma
-_frv_get_got_entry (struct _frv_dynamic_got_alloc_data *gad)
+_frvfdpic_get_got_entry (struct _frvfdpic_dynamic_got_alloc_data *gad)
{
bfd_signed_vma ret;
GOT, given the allocation data for a range. */
inline static bfd_signed_vma
-_frv_get_fd_entry (struct _frv_dynamic_got_alloc_data *gad)
+_frvfdpic_get_fd_entry (struct _frvfdpic_dynamic_got_alloc_data *gad)
{
/* If we're at the bottom, wrap around, and only then allocate the
next pair of words. */
Doing everything in a single pass is tricky. */
static int
-_frv_assign_got_entries (void **entryp, void *info_)
+_frvfdpic_assign_got_entries (void **entryp, void *info_)
{
- struct frv_pic_relocs_info *entry = *entryp;
- struct _frv_dynamic_got_plt_info *dinfo = info_;
+ struct frvfdpic_relocs_info *entry = *entryp;
+ struct _frvfdpic_dynamic_got_plt_info *dinfo = info_;
if (entry->got12)
- entry->got_entry = _frv_get_got_entry (&dinfo->got12);
+ entry->got_entry = _frvfdpic_get_got_entry (&dinfo->got12);
else if (entry->gotlos)
- entry->got_entry = _frv_get_got_entry (&dinfo->gotlos);
+ entry->got_entry = _frvfdpic_get_got_entry (&dinfo->gotlos);
else if (entry->gothilo)
- entry->got_entry = _frv_get_got_entry (&dinfo->gothilo);
+ entry->got_entry = _frvfdpic_get_got_entry (&dinfo->gothilo);
if (entry->fdgot12)
- entry->fdgot_entry = _frv_get_got_entry (&dinfo->got12);
+ entry->fdgot_entry = _frvfdpic_get_got_entry (&dinfo->got12);
else if (entry->fdgotlos)
- entry->fdgot_entry = _frv_get_got_entry (&dinfo->gotlos);
+ entry->fdgot_entry = _frvfdpic_get_got_entry (&dinfo->gotlos);
else if (entry->fdgothilo)
- entry->fdgot_entry = _frv_get_got_entry (&dinfo->gothilo);
+ entry->fdgot_entry = _frvfdpic_get_got_entry (&dinfo->gothilo);
if (entry->fdgoff12)
- entry->fd_entry = _frv_get_fd_entry (&dinfo->got12);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->got12);
else if (entry->plt && dinfo->got12.fdplt)
{
dinfo->got12.fdplt -= 8;
- entry->fd_entry = _frv_get_fd_entry (&dinfo->got12);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->got12);
}
else if (entry->fdgofflos)
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gotlos);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gotlos);
else if (entry->plt && dinfo->gotlos.fdplt)
{
dinfo->gotlos.fdplt -= 8;
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gotlos);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gotlos);
}
else if (entry->plt)
{
dinfo->gothilo.fdplt -= 8;
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gothilo);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gothilo);
}
else if (entry->privfd)
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gothilo);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gothilo);
return 1;
}
and lazy PLT entries. */
static int
-_frv_assign_plt_entries (void **entryp, void *info_)
+_frvfdpic_assign_plt_entries (void **entryp, void *info_)
{
- struct frv_pic_relocs_info *entry = *entryp;
- struct _frv_dynamic_got_plt_info *dinfo = info_;
+ struct frvfdpic_relocs_info *entry = *entryp;
+ struct _frvfdpic_dynamic_got_plt_info *dinfo = info_;
/* If this symbol requires a local function descriptor, allocate
one. */
{
if (dinfo->got12.fdplt)
{
- entry->fd_entry = _frv_get_fd_entry (&dinfo->got12);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->got12);
dinfo->got12.fdplt -= 8;
}
else if (dinfo->gotlos.fdplt)
{
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gotlos);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gotlos);
dinfo->gotlos.fdplt -= 8;
}
else
{
BFD_ASSERT (dinfo->gothilo.fdplt)
- entry->fd_entry = _frv_get_fd_entry (&dinfo->gothilo);
+ entry->fd_entry = _frvfdpic_get_fd_entry (&dinfo->gothilo);
dinfo->gothilo.fdplt -= 8;
}
}
/* We use the section's raw size to mark the location of the
next PLT entry. */
- entry->plt_entry = frv_plt_section (dinfo->g.info)->_raw_size;
+ entry->plt_entry = frvfdpic_plt_section (dinfo->g.info)->_raw_size;
/* Figure out the length of this PLT entry based on the
addressing mode we need to reach the function descriptor. */
else
size = 16;
- frv_plt_section (dinfo->g.info)->_raw_size += size;
+ frvfdpic_plt_section (dinfo->g.info)->_raw_size += size;
}
if (entry->lazyplt)
dinfo->g.lzplt += 8;
/* If this entry is the one that gets the resolver stub, account
for the additional instruction. */
- if (entry->lzplt_entry % FRV_LZPLT_BLOCK_SIZE == FRV_LZPLT_RESOLV_LOC)
+ if (entry->lzplt_entry % FRVFDPIC_LZPLT_BLOCK_SIZE
+ == FRVFDPIC_LZPLT_RESOLV_LOC)
dinfo->g.lzplt += 4;
}
we've made a potentially-destructive change to the hash table, so
the traversal must be restarted. */
static int
-_frv_resolve_final_relocs_info (void **entryp, void *p)
+_frvfdpic_resolve_final_relocs_info (void **entryp, void *p)
{
- struct frv_pic_relocs_info *entry = *entryp;
+ struct frvfdpic_relocs_info *entry = *entryp;
htab_t *htab = p;
if (entry->symndx == -1)
{
struct elf_link_hash_entry *h = entry->d.h;
- struct frv_pic_relocs_info *oentry;
+ struct frvfdpic_relocs_info *oentry;
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
if (entry->d.h == h)
return 1;
- oentry = frv_pic_relocs_info_for_global (*htab, 0, h, entry->addend,
- NO_INSERT);
+ oentry = frvfdpic_relocs_info_for_global (*htab, 0, h, entry->addend,
+ NO_INSERT);
if (oentry)
{
/* Merge the two entries. */
- frv_pic_merge_early_relocs_info (oentry, entry);
+ frvfdpic_pic_merge_early_relocs_info (oentry, entry);
htab_clear_slot (*htab, entryp);
return 1;
}
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-elf32_frv_size_dynamic_sections (bfd *output_bfd,
- struct bfd_link_info *info)
+elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *s;
- struct _frv_dynamic_got_plt_info gpinfo;
+ struct _frvfdpic_dynamic_got_plt_info gpinfo;
bfd_signed_vma odd;
bfd_vma limit;
for (;;)
{
- htab_t relocs = frv_relocs_info (info);
+ htab_t relocs = frvfdpic_relocs_info (info);
- htab_traverse (relocs, _frv_resolve_final_relocs_info, &relocs);
+ htab_traverse (relocs, _frvfdpic_resolve_final_relocs_info, &relocs);
- if (relocs == frv_relocs_info (info))
+ if (relocs == frvfdpic_relocs_info (info))
break;
}
- htab_traverse (frv_relocs_info (info), _frv_count_got_plt_entries,
+ htab_traverse (frvfdpic_relocs_info (info), _frvfdpic_count_got_plt_entries,
&gpinfo.g);
odd = 12;
/* Determine the ranges of GOT offsets that we can use for each
range of addressing modes. */
- odd = _frv_compute_got_alloc_data (&gpinfo.got12,
- 0,
- odd,
- 16,
- gpinfo.g.got12,
- gpinfo.g.fd12,
- limit,
- (bfd_vma)1 << (12-1));
- odd = _frv_compute_got_alloc_data (&gpinfo.gotlos,
- gpinfo.got12.min,
- odd,
- gpinfo.got12.max,
- gpinfo.g.gotlos,
- gpinfo.g.fdlos,
- gpinfo.g.fdplt - gpinfo.got12.fdplt,
- (bfd_vma)1 << (16-1));
- odd = _frv_compute_got_alloc_data (&gpinfo.gothilo,
- gpinfo.gotlos.min,
- odd,
- gpinfo.gotlos.max,
- gpinfo.g.gothilo,
- gpinfo.g.fdhilo,
- gpinfo.g.fdplt - gpinfo.got12.fdplt
- - gpinfo.gotlos.fdplt,
- (bfd_vma)1 << (32-1));
+ odd = _frvfdpic_compute_got_alloc_data (&gpinfo.got12,
+ 0,
+ odd,
+ 16,
+ gpinfo.g.got12,
+ gpinfo.g.fd12,
+ limit,
+ (bfd_vma)1 << (12-1));
+ odd = _frvfdpic_compute_got_alloc_data (&gpinfo.gotlos,
+ gpinfo.got12.min,
+ odd,
+ gpinfo.got12.max,
+ gpinfo.g.gotlos,
+ gpinfo.g.fdlos,
+ gpinfo.g.fdplt - gpinfo.got12.fdplt,
+ (bfd_vma)1 << (16-1));
+ odd = _frvfdpic_compute_got_alloc_data (&gpinfo.gothilo,
+ gpinfo.gotlos.min,
+ odd,
+ gpinfo.gotlos.max,
+ gpinfo.g.gothilo,
+ gpinfo.g.fdhilo,
+ gpinfo.g.fdplt - gpinfo.got12.fdplt
+ - gpinfo.gotlos.fdplt,
+ (bfd_vma)1 << (32-1));
/* Now assign (most) GOT offsets. */
- htab_traverse (frv_relocs_info (info), _frv_assign_got_entries, &gpinfo);
+ htab_traverse (frvfdpic_relocs_info (info), _frvfdpic_assign_got_entries,
+ &gpinfo);
- frv_got_section (info)->_raw_size = gpinfo.gothilo.max - gpinfo.gothilo.min
+ frvfdpic_got_section (info)->_raw_size = gpinfo.gothilo.max
+ - gpinfo.gothilo.min
/* If an odd word is the last word of the GOT, we don't need this
word to be part of the GOT. */
- (odd + 4 == gpinfo.gothilo.max ? 4 : 0);
- if (frv_got_section (info)->_raw_size == 0)
- frv_got_section (info)->flags |= SEC_EXCLUDE;
- else if (frv_got_section (info)->_raw_size == 12
+ if (frvfdpic_got_section (info)->_raw_size == 0)
+ frvfdpic_got_section (info)->flags |= SEC_EXCLUDE;
+ else if (frvfdpic_got_section (info)->_raw_size == 12
&& ! elf_hash_table (info)->dynamic_sections_created)
{
- frv_got_section (info)->flags |= SEC_EXCLUDE;
- frv_got_section (info)->_raw_size = 0;
+ frvfdpic_got_section (info)->flags |= SEC_EXCLUDE;
+ frvfdpic_got_section (info)->_raw_size = 0;
}
else
{
- frv_got_section (info)->contents =
- (bfd_byte *) bfd_zalloc (dynobj, frv_got_section (info)->_raw_size);
- if (frv_got_section (info)->contents == NULL)
+ frvfdpic_got_section (info)->contents =
+ (bfd_byte *) bfd_zalloc (dynobj,
+ frvfdpic_got_section (info)->_raw_size);
+ if (frvfdpic_got_section (info)->contents == NULL)
return FALSE;
}
if (elf_hash_table (info)->dynamic_sections_created)
/* Subtract the number of lzplt entries, since those will generate
relocations in the pltrel section. */
- frv_gotrel_section (info)->_raw_size =
+ frvfdpic_gotrel_section (info)->_raw_size =
(gpinfo.g.relocs - gpinfo.g.lzplt / 8)
* get_elf_backend_data (output_bfd)->s->sizeof_rel;
else
BFD_ASSERT (gpinfo.g.relocs == 0);
- if (frv_gotrel_section (info)->_raw_size == 0)
- frv_gotrel_section (info)->flags |= SEC_EXCLUDE;
+ if (frvfdpic_gotrel_section (info)->_raw_size == 0)
+ frvfdpic_gotrel_section (info)->flags |= SEC_EXCLUDE;
else
{
- frv_gotrel_section (info)->contents =
- (bfd_byte *) bfd_zalloc (dynobj, frv_gotrel_section (info)->_raw_size);
- if (frv_gotrel_section (info)->contents == NULL)
+ frvfdpic_gotrel_section (info)->contents =
+ (bfd_byte *) bfd_zalloc (dynobj,
+ frvfdpic_gotrel_section (info)->_raw_size);
+ if (frvfdpic_gotrel_section (info)->contents == NULL)
return FALSE;
}
- if (elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC)
- frv_gotfixup_section (info)->_raw_size = (gpinfo.g.fixups + 1) * 4;
- if (frv_gotfixup_section (info)->_raw_size == 0)
- frv_gotfixup_section (info)->flags |= SEC_EXCLUDE;
+ frvfdpic_gotfixup_section (info)->_raw_size = (gpinfo.g.fixups + 1) * 4;
+ if (frvfdpic_gotfixup_section (info)->_raw_size == 0)
+ frvfdpic_gotfixup_section (info)->flags |= SEC_EXCLUDE;
else
{
- frv_gotfixup_section (info)->contents =
+ frvfdpic_gotfixup_section (info)->contents =
(bfd_byte *) bfd_zalloc (dynobj,
- frv_gotfixup_section (info)->_raw_size);
- if (frv_gotfixup_section (info)->contents == NULL)
+ frvfdpic_gotfixup_section (info)->_raw_size);
+ if (frvfdpic_gotfixup_section (info)->contents == NULL)
return FALSE;
}
if (elf_hash_table (info)->dynamic_sections_created)
{
- frv_pltrel_section (info)->_raw_size =
+ frvfdpic_pltrel_section (info)->_raw_size =
gpinfo.g.lzplt / 8 * get_elf_backend_data (output_bfd)->s->sizeof_rel;
- if (frv_pltrel_section (info)->_raw_size == 0)
- frv_pltrel_section (info)->flags |= SEC_EXCLUDE;
+ if (frvfdpic_pltrel_section (info)->_raw_size == 0)
+ frvfdpic_pltrel_section (info)->flags |= SEC_EXCLUDE;
else
{
- frv_pltrel_section (info)->contents =
+ frvfdpic_pltrel_section (info)->contents =
(bfd_byte *) bfd_zalloc (dynobj,
- frv_pltrel_section (info)->_raw_size);
- if (frv_pltrel_section (info)->contents == NULL)
+ frvfdpic_pltrel_section (info)
+ ->_raw_size);
+ if (frvfdpic_pltrel_section (info)->contents == NULL)
return FALSE;
}
}
/* Add 4 bytes for every block of at most 65535 lazy PLT entries,
such that there's room for the additional instruction needed to
- call the resolver. Since _frv_assign_got_entries didn't account
- for them, our block size is 4 bytes smaller than the real block
- size. */
+ call the resolver. Since _frvfdpic_assign_got_entries didn't
+ account for them, our block size is 4 bytes smaller than the real
+ block size. */
if (elf_hash_table (info)->dynamic_sections_created)
{
- frv_plt_section (info)->_raw_size = gpinfo.g.lzplt
- + ((gpinfo.g.lzplt + (FRV_LZPLT_BLOCK_SIZE - 4) - 8)
- / (FRV_LZPLT_BLOCK_SIZE - 4) * 4);
+ frvfdpic_plt_section (info)->_raw_size = gpinfo.g.lzplt
+ + ((gpinfo.g.lzplt + (FRVFDPIC_LZPLT_BLOCK_SIZE - 4) - 8)
+ / (FRVFDPIC_LZPLT_BLOCK_SIZE - 4) * 4);
}
- /* Reset it, such that _frv_assign_plt_entries() can use it to
+ /* Reset it, such that _frvfdpic_assign_plt_entries() can use it to
actually assign lazy PLT entries addresses. */
gpinfo.g.lzplt = 0;
/* Save information that we're going to need to generate GOT and PLT
entries. */
- frv_got_initial_offset (info) = -gpinfo.gothilo.min;
+ frvfdpic_got_initial_offset (info) = -gpinfo.gothilo.min;
if (get_elf_backend_data (output_bfd)->want_got_sym)
elf_hash_table (info)->hgot->root.u.def.value
- += frv_got_initial_offset (info);
+ += frvfdpic_got_initial_offset (info);
if (elf_hash_table (info)->dynamic_sections_created)
- frv_plt_initial_offset (info) = frv_plt_section (info)->_raw_size;
+ frvfdpic_plt_initial_offset (info) =
+ frvfdpic_plt_section (info)->_raw_size;
- htab_traverse (frv_relocs_info (info), _frv_assign_plt_entries, &gpinfo);
+ htab_traverse (frvfdpic_relocs_info (info), _frvfdpic_assign_plt_entries,
+ &gpinfo);
/* Allocate the PLT section contents only after
- _frv_assign_plt_entries has a chance to add the size of the
+ _frvfdpic_assign_plt_entries has a chance to add the size of the
non-lazy PLT entries. */
if (elf_hash_table (info)->dynamic_sections_created)
{
- if (frv_plt_section (info)->_raw_size == 0)
- frv_plt_section (info)->flags |= SEC_EXCLUDE;
+ if (frvfdpic_plt_section (info)->_raw_size == 0)
+ frvfdpic_plt_section (info)->flags |= SEC_EXCLUDE;
else
{
- frv_plt_section (info)->contents =
- (bfd_byte *) bfd_zalloc (dynobj, frv_plt_section (info)->_raw_size);
- if (frv_plt_section (info)->contents == NULL)
+ frvfdpic_plt_section (info)->contents =
+ (bfd_byte *) bfd_zalloc (dynobj,
+ frvfdpic_plt_section (info)->_raw_size);
+ if (frvfdpic_plt_section (info)->contents == NULL)
return FALSE;
}
}
if (elf_hash_table (info)->dynamic_sections_created)
{
- if (frv_got_section (info)->_raw_size)
+ if (frvfdpic_got_section (info)->_raw_size)
if (!_bfd_elf_add_dynamic_entry (info, DT_PLTGOT, 0))
return FALSE;
- if (frv_pltrel_section (info)->_raw_size)
+ if (frvfdpic_pltrel_section (info)->_raw_size)
if (!_bfd_elf_add_dynamic_entry (info, DT_PLTRELSZ, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_PLTREL, DT_REL)
|| !_bfd_elf_add_dynamic_entry (info, DT_JMPREL, 0))
return FALSE;
- if (frv_gotrel_section (info)->_raw_size)
+ if (frvfdpic_gotrel_section (info)->_raw_size)
if (!_bfd_elf_add_dynamic_entry (info, DT_REL, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_RELSZ, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_RELENT,
}
static bfd_boolean
-elf32_frv_always_size_sections (bfd *output_bfd,
- struct bfd_link_info *info)
+elf32_frvfdpic_always_size_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
- if (!info->relocatable
- && elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC)
+ if (!info->relocatable)
{
struct elf_link_hash_entry *h;
asection *sec;
}
static bfd_boolean
-elf32_frv_modify_segment_map (bfd *output_bfd,
- struct bfd_link_info *info)
+elf32_frvfdpic_modify_segment_map (bfd *output_bfd,
+ struct bfd_link_info *info)
{
- if (elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC)
- {
- struct elf_segment_map *m;
+ struct elf_segment_map *m;
- for (m = elf_tdata (output_bfd)->segment_map; m != NULL; m = m->next)
- if (m->p_type == PT_GNU_STACK)
- break;
+ for (m = elf_tdata (output_bfd)->segment_map; m != NULL; m = m->next)
+ if (m->p_type == PT_GNU_STACK)
+ break;
+
+ if (m)
+ {
+ asection *sec = bfd_get_section_by_name (output_bfd, ".stack");
+ struct elf_link_hash_entry *h;
- if (m)
+ if (sec)
{
- asection *sec = bfd_get_section_by_name (output_bfd, ".stack");
- struct elf_link_hash_entry *h;
+ /* Obtain the pointer to the __stacksize symbol. */
+ h = elf_link_hash_lookup (elf_hash_table (info), "__stacksize",
+ FALSE, FALSE, FALSE);
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *)h->root.u.i.link;
+ BFD_ASSERT (h->root.type == bfd_link_hash_defined);
- if (sec)
- {
- /* Obtain the pointer to the __stacksize symbol. */
- h = elf_link_hash_lookup (elf_hash_table (info), "__stacksize",
- FALSE, FALSE, FALSE);
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *)h->root.u.i.link;
- BFD_ASSERT (h->root.type == bfd_link_hash_defined);
-
- /* Set the section size from the symbol value. We
- intentionally ignore the symbol section. */
- if (h->root.type == bfd_link_hash_defined)
- sec->_raw_size = h->root.u.def.value;
- else
- sec->_raw_size = DEFAULT_STACK_SIZE;
+ /* Set the section size from the symbol value. We
+ intentionally ignore the symbol section. */
+ if (h->root.type == bfd_link_hash_defined)
+ sec->_raw_size = h->root.u.def.value;
+ else
+ sec->_raw_size = DEFAULT_STACK_SIZE;
- /* Add the stack section to the PT_GNU_STACK segment,
- such that its size and alignment requirements make it
- to the segment. */
- m->sections[m->count] = sec;
- m->count++;
- }
+ /* Add the stack section to the PT_GNU_STACK segment,
+ such that its size and alignment requirements make it
+ to the segment. */
+ m->sections[m->count] = sec;
+ m->count++;
}
}
/* Fill in code and data in dynamic sections. */
static bfd_boolean
-elf32_frv_finish_dynamic_sections (bfd *output_bfd,
- struct bfd_link_info *info)
+elf32_frv_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ /* Nothing to be done for non-FDPIC. */
+ return TRUE;
+}
+
+static bfd_boolean
+elf32_frvfdpic_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *sdyn;
dynobj = elf_hash_table (info)->dynobj;
- if (frv_got_section (info))
+ if (frvfdpic_got_section (info))
{
- BFD_ASSERT (frv_gotrel_section (info)->_raw_size
- == (frv_gotrel_section (info)->reloc_count
+ BFD_ASSERT (frvfdpic_gotrel_section (info)->_raw_size
+ == (frvfdpic_gotrel_section (info)->reloc_count
* sizeof (Elf32_External_Rel)));
- if (frv_gotfixup_section (info))
+ if (frvfdpic_gotfixup_section (info))
{
- if (elf_elfheader (output_bfd)->e_flags & EF_FRV_FDPIC)
- {
- struct elf_link_hash_entry *hgot = elf_hash_table (info)->hgot;
- bfd_vma got_value = hgot->root.u.def.value
- + hgot->root.u.def.section->output_section->vma
- + hgot->root.u.def.section->output_offset;
+ struct elf_link_hash_entry *hgot = elf_hash_table (info)->hgot;
+ bfd_vma got_value = hgot->root.u.def.value
+ + hgot->root.u.def.section->output_section->vma
+ + hgot->root.u.def.section->output_offset;
- _frv_add_rofixup (output_bfd, frv_gotfixup_section (info),
- got_value, 0);
- }
+ _frvfdpic_add_rofixup (output_bfd, frvfdpic_gotfixup_section (info),
+ got_value, 0);
- if (frv_gotfixup_section (info)->_raw_size
- != (frv_gotfixup_section (info)->reloc_count * 4))
+ if (frvfdpic_gotfixup_section (info)->_raw_size
+ != (frvfdpic_gotfixup_section (info)->reloc_count * 4))
{
- if (frv_gotfixup_section (info)->_raw_size
- < frv_gotfixup_section (info)->reloc_count * 4)
- {
- info->callbacks->warning
- (info, "LINKER BUG: .rofixup section size mismatch",
- ".rofixup", NULL, NULL, 0);
- abort ();
- return FALSE;
- }
- else if (!elf_hash_table (info)->dynamic_sections_created)
- {
- info->callbacks->warning
- (info, "no dynamic sections, missing -melf32frvfd?",
- ".rofixup", NULL, NULL, 0);
- return FALSE;
- }
- BFD_ASSERT (0);
+ (*_bfd_error_handler)
+ ("LINKER BUG: .rofixup section size mismatch");
+ return FALSE;
}
}
}
if (elf_hash_table (info)->dynamic_sections_created)
{
- BFD_ASSERT (frv_pltrel_section (info)->_raw_size
- == (frv_pltrel_section (info)->reloc_count
+ BFD_ASSERT (frvfdpic_pltrel_section (info)->_raw_size
+ == (frvfdpic_pltrel_section (info)->reloc_count
* sizeof (Elf32_External_Rel)));
}
break;
case DT_PLTGOT:
- dyn.d_un.d_ptr = frv_got_section (info)->output_section->vma
- + frv_got_section (info)->output_offset
- + frv_got_initial_offset (info);
+ dyn.d_un.d_ptr = frvfdpic_got_section (info)->output_section->vma
+ + frvfdpic_got_section (info)->output_offset
+ + frvfdpic_got_initial_offset (info);
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_JMPREL:
- dyn.d_un.d_ptr = frv_pltrel_section (info)->output_section->vma
- + frv_pltrel_section (info)->output_offset;
+ dyn.d_un.d_ptr = frvfdpic_pltrel_section (info)
+ ->output_section->vma
+ + frvfdpic_pltrel_section (info)->output_offset;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_PLTRELSZ:
- if (frv_pltrel_section (info)->_cooked_size != 0)
- dyn.d_un.d_val = frv_pltrel_section (info)->_cooked_size;
+ if (frvfdpic_pltrel_section (info)->_cooked_size != 0)
+ dyn.d_un.d_val = frvfdpic_pltrel_section (info)->_cooked_size;
else
- dyn.d_un.d_val = frv_pltrel_section (info)->_raw_size;
+ dyn.d_un.d_val = frvfdpic_pltrel_section (info)->_raw_size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
}
regular object. */
static bfd_boolean
-elf32_frv_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
+elf32_frvfdpic_adjust_dynamic_symbol
+(struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
{
bfd * dynobj;
/* Perform any actions needed for dynamic symbols. */
static bfd_boolean
-elf32_frv_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED,
- Elf_Internal_Sym *sym ATTRIBUTE_UNUSED)
+elf32_frvfdpic_finish_dynamic_symbol
+(bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h ATTRIBUTE_UNUSED,
+ Elf_Internal_Sym *sym ATTRIBUTE_UNUSED)
{
return TRUE;
}
shared libraries into pcrel within the given input section. */
static bfd_boolean
-frv_elf_use_relative_eh_frame (bfd *input_bfd,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- asection *eh_frame_section ATTRIBUTE_UNUSED)
+frvfdpic_elf_use_relative_eh_frame
+(bfd *input_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *eh_frame_section ATTRIBUTE_UNUSED)
{
/* We can't use PC-relative encodings in FDPIC binaries, in general. */
- if (elf_elfheader (input_bfd)->e_flags & EF_FRV_FDPIC)
- return FALSE;
-
- return TRUE;
+ return FALSE;
}
/* Adjust the contents of an eh_frame_hdr section before they're output. */
static bfd_byte
-frv_elf_encode_eh_address (bfd *abfd,
- struct bfd_link_info *info,
- asection *osec, bfd_vma offset,
- asection *loc_sec, bfd_vma loc_offset,
- bfd_vma *encoded)
+frvfdpic_elf_encode_eh_address (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *osec, bfd_vma offset,
+ asection *loc_sec, bfd_vma loc_offset,
+ bfd_vma *encoded)
{
struct elf_link_hash_entry *h;
- /* Non-FDPIC binaries can use PC-relative encodings. */
- if (! (elf_elfheader (abfd)->e_flags & EF_FRV_FDPIC))
- return _bfd_elf_encode_eh_address (abfd, info, osec, offset,
- loc_sec, loc_offset, encoded);
-
h = elf_hash_table (info)->hgot;
BFD_ASSERT (h && h->root.type == bfd_link_hash_defined);
- if (! h || (_frv_osec_to_segment (abfd, osec)
- == _frv_osec_to_segment (abfd, loc_sec->output_section)))
+ if (! h || (_frvfdpic_osec_to_segment (abfd, osec)
+ == _frvfdpic_osec_to_segment (abfd, loc_sec->output_section)))
return _bfd_elf_encode_eh_address (abfd, info, osec, offset,
loc_sec, loc_offset, encoded);
- BFD_ASSERT (_frv_osec_to_segment (abfd, osec)
- == _frv_osec_to_segment (abfd,
- h->root.u.def.section->output_section));
+ BFD_ASSERT (_frvfdpic_osec_to_segment (abfd, osec)
+ == (_frvfdpic_osec_to_segment
+ (abfd, h->root.u.def.section->output_section)));
*encoded = osec->vma + offset
- (h->root.u.def.value
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
bfd *dynobj;
- struct frv_pic_relocs_info *picrel;
+ struct frvfdpic_relocs_info *picrel;
if (info->relocatable)
return TRUE;
switch (ELF32_R_TYPE (rel->r_info))
{
- case R_FRV_LABEL24:
- case R_FRV_32:
case R_FRV_GOT12:
case R_FRV_GOTHI:
case R_FRV_GOTLO:
case R_FRV_FUNCDESC_GOTOFFLO:
case R_FRV_FUNCDESC:
case R_FRV_FUNCDESC_VALUE:
+ if (! IS_FDPIC (abfd))
+ goto bad_reloc;
+ /* Fall through. */
+ case R_FRV_GPREL12:
+ case R_FRV_GPRELU12:
+ case R_FRV_GPRELHI:
+ case R_FRV_GPRELLO:
+ case R_FRV_LABEL24:
+ case R_FRV_32:
if (! dynobj)
{
elf_hash_table (info)->dynobj = dynobj = abfd;
if (! _frv_create_got_section (abfd, info))
return FALSE;
}
+ if (! IS_FDPIC (abfd))
+ {
+ picrel = NULL;
+ break;
+ }
if (h != NULL)
{
if (h->dynindx == -1)
break;
}
picrel
- = frv_pic_relocs_info_for_global (frv_relocs_info (info),
- abfd, h,
- rel->r_addend, INSERT);
+ = frvfdpic_relocs_info_for_global (frvfdpic_relocs_info (info),
+ abfd, h,
+ rel->r_addend, INSERT);
}
else
- picrel = frv_pic_relocs_info_for_local (frv_relocs_info (info),
- abfd, r_symndx,
- rel->r_addend, INSERT);
+ picrel = frvfdpic_relocs_info_for_local (frvfdpic_relocs_info
+ (info), abfd, r_symndx,
+ rel->r_addend, INSERT);
if (! picrel)
return FALSE;
break;
switch (ELF32_R_TYPE (rel->r_info))
{
case R_FRV_LABEL24:
- picrel->call = 1;
+ if (IS_FDPIC (abfd))
+ picrel->call = 1;
break;
case R_FRV_FUNCDESC_VALUE:
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
picrel->relocs32--;
/* Fall through. */
+
case R_FRV_32:
+ if (! IS_FDPIC (abfd))
+ break;
+
picrel->sym = 1;
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
picrel->relocs32++;
if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return FALSE;
break;
+
+ case R_FRV_LABEL16:
+ case R_FRV_LO16:
+ case R_FRV_HI16:
+ case R_FRV_GPREL12:
+ case R_FRV_GPRELU12:
+ case R_FRV_GPREL32:
+ case R_FRV_GPRELHI:
+ case R_FRV_GPRELLO:
+ break;
+
+ default:
+ bad_reloc:
+ (*_bfd_error_handler)
+ (_("%s: unsupported relocation type %i"),
+ bfd_archive_filename (abfd), ELF32_R_TYPE (rel->r_info));
+ return FALSE;
}
}
bfd *abfd;
{
bfd_default_set_arch_mach (abfd, bfd_arch_frv, elf32_frv_machine (abfd));
- return TRUE;
+ return (((elf_elfheader (abfd)->e_flags & EF_FRV_FDPIC) != 0)
+ == (IS_FDPIC (abfd)));
}
\f
/* Function to set the ELF flag bits. */
if (old_partial != (old_flags & EF_FRV_CPU_MASK))
bfd_default_set_arch_mach (obfd, bfd_arch_frv, elf32_frv_machine (obfd));
+ if (((new_flags & EF_FRV_FDPIC) == 0)
+ != (! IS_FDPIC (ibfd)))
+ {
+ error = TRUE;
+ if (IS_FDPIC (obfd))
+ (*_bfd_error_handler)
+ (_("%s: cannot link non-fdpic object file into fdpic executable"),
+ bfd_get_filename (ibfd));
+ else
+ (*_bfd_error_handler)
+ (_("%s: cannot link fdpic object file into non-fdpic executable"),
+ bfd_get_filename (ibfd));
+ }
+
if (error)
bfd_set_error (bfd_error_bad_value);
#define TARGET_BIG_SYM bfd_elf32_frv_vec
#define TARGET_BIG_NAME "elf32-frv"
-#define elf_info_to_howto_rel frv_info_to_howto_rel
#define elf_info_to_howto frv_info_to_howto_rela
#define elf_backend_relocate_section elf32_frv_relocate_section
#define elf_backend_gc_mark_hook elf32_frv_gc_mark_hook
#define bfd_elf32_bfd_merge_private_bfd_data frv_elf_merge_private_bfd_data
#define bfd_elf32_bfd_print_private_bfd_data frv_elf_print_private_bfd_data
-#define bfd_elf32_bfd_link_hash_table_create frv_elf_link_hash_table_create
+#define elf_backend_want_got_sym 1
+#define elf_backend_got_header_size 0
+#define elf_backend_want_got_plt 0
+#define elf_backend_plt_readonly 1
+#define elf_backend_want_plt_sym 0
+#define elf_backend_plt_header_size 0
+
+#define elf_backend_finish_dynamic_sections \
+ elf32_frv_finish_dynamic_sections
+
+#include "elf32-target.h"
+
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x4000
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_frvfdpic_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-frvfdpic"
+#undef elf32_bed
+#define elf32_bed elf32_frvfdpic_bed
+
+#undef elf_info_to_howto_rel
+#define elf_info_to_howto_rel frvfdpic_info_to_howto_rel
+
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ frvfdpic_elf_link_hash_table_create
+#undef elf_backend_always_size_sections
#define elf_backend_always_size_sections \
- elf32_frv_always_size_sections
+ elf32_frvfdpic_always_size_sections
+#undef elf_backend_modify_segment_map
#define elf_backend_modify_segment_map \
- elf32_frv_modify_segment_map
+ elf32_frvfdpic_modify_segment_map
+#undef elf_backend_create_dynamic_sections
#define elf_backend_create_dynamic_sections \
- elf32_frv_create_dynamic_sections
+ elf32_frvfdpic_create_dynamic_sections
+#undef elf_backend_adjust_dynamic_symbol
#define elf_backend_adjust_dynamic_symbol \
- elf32_frv_adjust_dynamic_symbol
+ elf32_frvfdpic_adjust_dynamic_symbol
+#undef elf_backend_size_dynamic_sections
#define elf_backend_size_dynamic_sections \
- elf32_frv_size_dynamic_sections
+ elf32_frvfdpic_size_dynamic_sections
+#undef elf_backend_finish_dynamic_symbol
#define elf_backend_finish_dynamic_symbol \
- elf32_frv_finish_dynamic_symbol
+ elf32_frvfdpic_finish_dynamic_symbol
+#undef elf_backend_finish_dynamic_sections
#define elf_backend_finish_dynamic_sections \
- elf32_frv_finish_dynamic_sections
-
-#define elf_backend_want_got_sym 1
-#define elf_backend_got_header_size 0
-#define elf_backend_want_got_plt 0
-#define elf_backend_plt_readonly 1
-#define elf_backend_want_plt_sym 0
-#define elf_backend_plt_header_size 0
+ elf32_frvfdpic_finish_dynamic_sections
+#undef elf_backend_can_make_relative_eh_frame
#define elf_backend_can_make_relative_eh_frame \
- frv_elf_use_relative_eh_frame
+ frvfdpic_elf_use_relative_eh_frame
+#undef elf_backend_can_make_lsda_relative_eh_frame
#define elf_backend_can_make_lsda_relative_eh_frame \
- frv_elf_use_relative_eh_frame
-#define elf_backend_encode_eh_address frv_elf_encode_eh_address
+ frvfdpic_elf_use_relative_eh_frame
+#undef elf_backend_encode_eh_address
+#define elf_backend_encode_eh_address \
+ frvfdpic_elf_encode_eh_address
+#undef elf_backend_may_use_rel_p
#define elf_backend_may_use_rel_p 1
+#undef elf_backend_may_use_rela_p
#define elf_backend_may_use_rela_p 1
/* We use REL for dynamic relocations only. */
+#undef elf_backend_default_use_rela_p
#define elf_backend_default_use_rela_p 1
#include "elf32-target.h"