From d45fe813da000d2d7dc3fdf115b9a679e5042d93 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Mon, 19 Mar 2001 05:46:27 +0000 Subject: [PATCH] Fix solib support so that non-svr4-solib-host x svr4-solib-target will work. --- gdb/acconfig.h | 13 ++ gdb/config.in | 13 ++ gdb/configure | 383 +++++++++++++++++++++++++++++---------------- gdb/configure.in | 75 +++++++-- gdb/solib-legacy.c | 21 ++- 5 files changed, 351 insertions(+), 154 deletions(-) diff --git a/gdb/acconfig.h b/gdb/acconfig.h index 6a62bab2b4..2ae27180c2 100644 --- a/gdb/acconfig.h +++ b/gdb/acconfig.h @@ -49,6 +49,19 @@ /* Define if has pr_siginfo64_t */ #undef HAVE_PR_SIGINFO64_T +/* Define if exists and defines struct link_map which has + members with an ``l_'' prefix. (For Solaris, SVR4, and + SVR4-like systems.) */ +#undef HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS + +/* Define if exists and defines struct link_map which has + members with an ``lm_'' prefix. (For SunOS.) */ +#undef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS + +/* Define if exists and defines a struct so_map which has + members with an ``som_'' prefix. (Found on older *BSD systems.) */ +#undef HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS + /* Define if has struct link_map32 */ #undef HAVE_STRUCT_LINK_MAP32 diff --git a/gdb/config.in b/gdb/config.in index 032da3d1c9..db4f52595f 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -77,6 +77,19 @@ /* Define if your struct reg has r_gs. */ #undef HAVE_STRUCT_REG_R_GS +/* Define if exists and defines struct link_map which has + members with an ``l_'' prefix. (For Solaris, SVR4, and + SVR4-like systems.) */ +#undef HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS + +/* Define if exists and defines struct link_map which has + members with an ``lm_'' prefix. (For SunOS.) */ +#undef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS + +/* Define if exists and defines a struct so_map which has + members with an ``som_'' prefix. (Found on older *BSD systems.) */ +#undef HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS + /* Define if has struct link_map32 */ #undef HAVE_STRUCT_LINK_MAP32 diff --git a/gdb/configure b/gdb/configure index f83083177a..33f1627e32 100755 --- a/gdb/configure +++ b/gdb/configure @@ -5210,46 +5210,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 - - echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 -echo "configure:5216: checking for struct link_map32 in sys/link.h" >&5 - if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct link_map32 l; -; return 0; } -EOF -if { (eval echo configure:5229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - gdb_cv_have_struct_link_map32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - gdb_cv_have_struct_link_map32=no -fi -rm -f conftest* -fi - - echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 - if test $gdb_cv_have_struct_link_map32 = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_LINK_MAP32 1 -EOF - - fi if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 -echo "configure:5253: checking whether prfpregset_t type is broken" >&5 +echo "configure:5219: checking whether prfpregset_t type is broken" >&5 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5257,7 +5223,7 @@ else gdb_cv_prfpregset_t_broken=yes else cat > conftest.$ac_ext < int main () @@ -5267,7 +5233,7 @@ else return 0; } EOF -if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_prfpregset_t_broken=no else @@ -5292,12 +5258,12 @@ EOF echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5296: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 +echo "configure:5262: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5310,7 +5276,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_have_procfs_piocset=yes else @@ -5331,8 +5297,149 @@ EOF fi fi +if test ${host} = ${target} ; then + + echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 +echo "configure:5304: checking for member l_addr in struct link_map" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct link_map lm; (void) lm.l_addr; +; return 0; } +EOF +if { (eval echo configure:5316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_struct_link_map_with_l_members=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_struct_link_map_with_l_members=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 + if test $gdb_cv_have_struct_link_map_with_l_members = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 +EOF + + fi + + + echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 +echo "configure:5338: checking for member lm_addr in struct link_map" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct link_map lm; (void) lm.lm_addr; +; return 0; } +EOF +if { (eval echo configure:5351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_struct_link_map_with_lm_members=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_struct_link_map_with_lm_members=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 + if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 +EOF + + fi + + + echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 +echo "configure:5373: checking for member som_addr in struct so_map" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct so_map lm; (void) lm.som_addr; +; return 0; } +EOF +if { (eval echo configure:5386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_struct_so_map_with_som_members=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_struct_so_map_with_som_members=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 + if test $gdb_cv_have_struct_so_map_with_som_members = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 +EOF + + fi + + + echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 +echo "configure:5408: checking for struct link_map32 in sys/link.h" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct link_map32 l; +; return 0; } +EOF +if { (eval echo configure:5421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_struct_link_map32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_struct_link_map32=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 + if test $gdb_cv_have_struct_link_map32 = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_LINK_MAP32 1 +EOF + + fi +fi + echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5336: checking for main in -lm" >&5 +echo "configure:5443: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5340,14 +5447,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5458: \"$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 @@ -5376,7 +5483,7 @@ fi echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 -echo "configure:5380: checking for wctype in -lc" >&5 +echo "configure:5487: checking for wctype in -lc" >&5 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5384,7 +5491,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5506: \"$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 @@ -5414,7 +5521,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 -echo "configure:5418: checking for wctype in -lw" >&5 +echo "configure:5525: checking for wctype in -lw" >&5 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5422,7 +5529,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5544: \"$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 @@ -5465,12 +5572,12 @@ fi echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 -echo "configure:5469: checking for long long support in compiler" >&5 +echo "configure:5576: checking for long long support in compiler" >&5 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_c_long_long=yes else @@ -5502,7 +5609,7 @@ fi echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 -echo "configure:5506: checking for long long support in printf" >&5 +echo "configure:5613: checking for long long support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5510,7 +5617,7 @@ else gdb_cv_printf_has_long_long=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_long=yes else @@ -5548,19 +5655,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 -echo "configure:5552: checking for long double support in compiler" >&5 +echo "configure:5659: checking for long double support in compiler" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_double=yes else @@ -5582,7 +5689,7 @@ fi echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 -echo "configure:5586: checking for long double support in printf" >&5 +echo "configure:5693: checking for long double support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5590,7 +5697,7 @@ else gdb_cv_printf_has_long_double=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_double=yes else @@ -5624,7 +5731,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 -echo "configure:5628: checking for long double support in scanf" >&5 +echo "configure:5735: checking for long double support in scanf" >&5 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5632,7 +5739,7 @@ else gdb_cv_scanf_has_long_double=no else cat > conftest.$ac_ext < 3.14159 && f < 3.14160); } EOF -if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_scanf_has_long_double=yes else @@ -5668,17 +5775,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5672: checking for $ac_hdr" >&5 +echo "configure:5779: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5789: \"$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* @@ -5707,12 +5814,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5711: checking for $ac_func" >&5 +echo "configure:5818: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5846: \"$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 @@ -5760,7 +5867,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:5764: checking for working mmap" >&5 +echo "configure:5871: 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 @@ -5768,7 +5875,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6019: \"$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 @@ -5937,7 +6044,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then case ${host_os} in hpux*) echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 -echo "configure:5941: checking for HPUX/OSF thread support" >&5 +echo "configure:6048: checking for HPUX/OSF thread support" >&5 if test -f /usr/include/dce/cma_config.h ; then if test "$GCC" = "yes" ; then echo "$ac_t""yes" 1>&6 @@ -5956,7 +6063,7 @@ EOF ;; solaris*) echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 -echo "configure:5960: checking for Solaris thread debugging library" >&5 +echo "configure:6067: checking for Solaris thread debugging library" >&5 if test -f /usr/lib/libthread_db.so.1 ; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -5966,7 +6073,7 @@ EOF CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:5970: checking for dlopen in -ldl" >&5 +echo "configure:6077: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5974,7 +6081,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6096: \"$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 @@ -6017,17 +6124,17 @@ fi # all symbols visible in the dynamic symbol table. hold_ldflags=$LDFLAGS echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 -echo "configure:6021: checking for the ld -export-dynamic flag" >&5 +echo "configure:6128: checking for the ld -export-dynamic flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -6046,13 +6153,13 @@ rm -f conftest* # Sun randomly tweaked the prototypes in # at one point. echo $ac_n "checking if is old""... $ac_c" 1>&6 -echo "configure:6050: checking if is old" >&5 +echo "configure:6157: checking if is old" >&5 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6063,7 +6170,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_proc_service_is_old=no else @@ -6280,7 +6387,7 @@ WERROR_CFLAGS="" if test "x${build_warnings}" != x -a "x$GCC" = xyes then echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 -echo "configure:6284: checking compiler warning flags" >&5 +echo "configure:6391: checking compiler warning flags" >&5 # Separate out the -Werror flag as some files just cannot be # compiled with it enabled. for w in ${build_warnings}; do @@ -6343,12 +6450,12 @@ fi if test $want_included_regex = false; then echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 -echo "configure:6347: checking for GNU regex" >&5 +echo "configure:6454: checking for GNU regex" >&5 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6360,7 +6467,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_have_gnu_regex=yes else @@ -6389,12 +6496,12 @@ fi # In the Cygwin environment, we need some additional flags. echo $ac_n "checking for cygwin""... $ac_c" 1>&6 -echo "configure:6393: checking for cygwin" >&5 +echo "configure:6500: checking for cygwin" >&5 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:6436: checking for tgetent in -lncurses" >&5 +echo "configure:6543: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6440,7 +6547,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6562: \"$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 @@ -6470,7 +6577,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 -echo "configure:6474: checking for tgetent in -lHcurses" >&5 +echo "configure:6581: checking for tgetent in -lHcurses" >&5 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6478,7 +6585,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lHcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6600: \"$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 @@ -6508,7 +6615,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 -echo "configure:6512: checking for tgetent in -ltermlib" >&5 +echo "configure:6619: checking for tgetent in -ltermlib" >&5 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6516,7 +6623,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6638: \"$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 @@ -6546,7 +6653,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:6550: checking for tgetent in -ltermcap" >&5 +echo "configure:6657: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6554,7 +6661,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6676: \"$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 @@ -6584,7 +6691,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:6588: checking for tgetent in -lcurses" >&5 +echo "configure:6695: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6592,7 +6699,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6714: \"$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 @@ -6622,7 +6729,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 -echo "configure:6626: checking for tgetent in -lterminfo" >&5 +echo "configure:6733: checking for tgetent in -lterminfo" >&5 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6630,7 +6737,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lterminfo $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6752: \"$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 @@ -6799,7 +6906,7 @@ if test "${with_tclconfig+set}" = set; then fi echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 -echo "configure:6803: checking for Tcl configuration" >&5 +echo "configure:6910: checking for Tcl configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6907,7 +7014,7 @@ if test "${with_tkconfig+set}" = set; then fi echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 -echo "configure:6911: checking for Tk configuration" >&5 +echo "configure:7018: checking for Tk configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7003,7 +7110,7 @@ fi no_tcl=true echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 -echo "configure:7007: checking for Tcl private headers. dir=${configdir}" >&5 +echo "configure:7114: checking for Tcl private headers. dir=${configdir}" >&5 # Check whether --with-tclinclude or --without-tclinclude was given. if test "${with_tclinclude+set}" = set; then withval="$with_tclinclude" @@ -7069,17 +7176,17 @@ fi if test x"${ac_cv_c_tclh}" = x ; then ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 -echo "configure:7073: checking for tclInt.h" >&5 +echo "configure:7180: checking for tclInt.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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7190: \"$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* @@ -7139,7 +7246,7 @@ fi # no_tk=true echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 -echo "configure:7143: checking for Tk private headers" >&5 +echo "configure:7250: checking for Tk private headers" >&5 # Check whether --with-tkinclude or --without-tkinclude was given. if test "${with_tkinclude+set}" = set; then withval="$with_tkinclude" @@ -7205,17 +7312,17 @@ fi if test x"${ac_cv_c_tkh}" = x ; then ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tk.h""... $ac_c" 1>&6 -echo "configure:7209: checking for tk.h" >&5 +echo "configure:7316: checking for tk.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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7326: \"$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* @@ -7261,7 +7368,7 @@ fi echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:7265: checking for Itcl private headers. srcdir=${srcdir}" >&5 +echo "configure:7372: checking for Itcl private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_itclh}" = x ; then for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do if test -f $i/generic/itcl.h ; then @@ -7284,7 +7391,7 @@ fi echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:7288: checking for Itk private headers. srcdir=${srcdir}" >&5 +echo "configure:7395: checking for Itk private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_itkh}" = x ; then for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do if test -f $i/generic/itk.h ; then @@ -7307,7 +7414,7 @@ fi echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:7311: checking for Tix private headers. srcdir=${srcdir}" >&5 +echo "configure:7418: checking for Tix private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_tixh}" = x ; then for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do if test -f $i/generic/tix.h ; then @@ -7345,7 +7452,7 @@ if test "${with_itclconfig+set}" = set; then fi echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 -echo "configure:7349: checking for Itcl configuration" >&5 +echo "configure:7456: checking for Itcl configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7457,7 +7564,7 @@ if test "${with_itkconfig+set}" = set; then fi echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 -echo "configure:7461: checking for Itk configuration" >&5 +echo "configure:7568: checking for Itk configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7569,7 +7676,7 @@ if test "${with_tixconfig+set}" = set; then fi echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 -echo "configure:7573: checking for Tix configuration" >&5 +echo "configure:7680: checking for Tix configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7709,7 +7816,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:7713: checking for X" >&5 +echo "configure:7820: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -7771,12 +7878,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7887: \"$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* @@ -7845,14 +7952,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -8192,7 +8299,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:8196: checking whether ln -s works" >&5 +echo "configure:8303: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8216,12 +8323,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:8220: checking for Cygwin environment" >&5 +echo "configure:8327: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -8249,19 +8356,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:8253: checking for mingw32 environment" >&5 +echo "configure:8360: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -8280,7 +8387,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:8284: checking for executable suffix" >&5 +echo "configure:8391: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8290,7 +8397,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:8294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:8401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; diff --git a/gdb/configure.in b/gdb/configure.in index cec924591f..f39f48fe91 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -244,19 +244,6 @@ if test "$ac_cv_header_sys_procfs_h" = yes; then BFD_HAVE_SYS_PROCFS_TYPE(pr_sigaction64_t) BFD_HAVE_SYS_PROCFS_TYPE(pr_siginfo64_t) - dnl Check for struct link_map32 type, which allows a 64-bit Solaris - dnl debugger to debug a 32-bit Solaris app with 32-bit shared libraries. - - AC_MSG_CHECKING(for struct link_map32 in sys/link.h) - AC_CACHE_VAL(gdb_cv_have_struct_link_map32, - [AC_TRY_COMPILE([#define _SYSCALL32 -#include ], [struct link_map32 l;], - gdb_cv_have_struct_link_map32=yes, - gdb_cv_have_struct_link_map32=no)]) - AC_MSG_RESULT($gdb_cv_have_struct_link_map32) - if test $gdb_cv_have_struct_link_map32 = yes; then - AC_DEFINE(HAVE_STRUCT_LINK_MAP32) - fi dnl Check for broken prfpregset_t type @@ -302,6 +289,68 @@ if test "$ac_cv_header_sys_procfs_h" = yes; then fi fi +dnl For native ports (host == target), check to see what kind of +dnl legacy link.h support is needed. (See solib-legacy.c.) +if test ${host} = ${target} ; then + dnl Check for struct link_map with l_ members which are indicative + dnl of SVR4-like shared libraries + + AC_MSG_CHECKING(for member l_addr in struct link_map) + AC_CACHE_VAL(gdb_cv_have_struct_link_map_with_l_members, + [AC_TRY_COMPILE([#include ], + [struct link_map lm; (void) lm.l_addr;], + gdb_cv_have_struct_link_map_with_l_members=yes, + gdb_cv_have_struct_link_map_with_l_members=no)]) + AC_MSG_RESULT($gdb_cv_have_struct_link_map_with_l_members) + if test $gdb_cv_have_struct_link_map_with_l_members = yes; then + AC_DEFINE(HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS) + fi + + dnl Check for struct link_map with lm_ members which are indicative + dnl of SunOS-like shared libraries + + AC_MSG_CHECKING(for member lm_addr in struct link_map) + AC_CACHE_VAL(gdb_cv_have_struct_link_map_with_lm_members, + [AC_TRY_COMPILE([#include +#include ], + [struct link_map lm; (void) lm.lm_addr;], + gdb_cv_have_struct_link_map_with_lm_members=yes, + gdb_cv_have_struct_link_map_with_lm_members=no)]) + AC_MSG_RESULT($gdb_cv_have_struct_link_map_with_lm_members) + if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then + AC_DEFINE(HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS) + fi + + dnl Check for struct so_map with som_ members which are found on + dnl some *BSD systems. + + AC_MSG_CHECKING(for member som_addr in struct so_map) + AC_CACHE_VAL(gdb_cv_have_struct_so_map_with_som_members, + [AC_TRY_COMPILE([#include +#include ], + [struct so_map lm; (void) lm.som_addr;], + gdb_cv_have_struct_so_map_with_som_members=yes, + gdb_cv_have_struct_so_map_with_som_members=no)]) + AC_MSG_RESULT($gdb_cv_have_struct_so_map_with_som_members) + if test $gdb_cv_have_struct_so_map_with_som_members = yes; then + AC_DEFINE(HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS) + fi + + dnl Check for struct link_map32 type, which allows a 64-bit Solaris + dnl debugger to debug a 32-bit Solaris app with 32-bit shared libraries. + + AC_MSG_CHECKING(for struct link_map32 in sys/link.h) + AC_CACHE_VAL(gdb_cv_have_struct_link_map32, + [AC_TRY_COMPILE([#define _SYSCALL32 +#include ], [struct link_map32 l;], + gdb_cv_have_struct_link_map32=yes, + gdb_cv_have_struct_link_map32=no)]) + AC_MSG_RESULT($gdb_cv_have_struct_link_map32) + if test $gdb_cv_have_struct_link_map32 = yes; then + AC_DEFINE(HAVE_STRUCT_LINK_MAP32) + fi +fi + dnl See if host has libm. This is usually needed by simulators. AC_CHECK_LIB(m, main) diff --git a/gdb/solib-legacy.c b/gdb/solib-legacy.c index 29ed014d62..e6507f20e4 100644 --- a/gdb/solib-legacy.c +++ b/gdb/solib-legacy.c @@ -49,7 +49,7 @@ legacy_svr4_fetch_link_map_offsets (void) { lmp = &lmo; -#ifdef SVR4_SHARED_LIBS +#ifdef HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS lmo.r_debug_size = sizeof (struct r_debug); lmo.r_map_offset = offsetof (struct r_debug, r_map); @@ -68,7 +68,8 @@ legacy_svr4_fetch_link_map_offsets (void) lmo.l_name_offset = offsetof (struct link_map, l_name); lmo.l_name_size = fieldsize (struct link_map, l_name); -#else /* !SVR4_SHARED_LIBS */ +#else /* !defined(HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS) */ +#ifdef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS lmo.link_map_size = sizeof (struct link_map); lmo.l_addr_offset = offsetof (struct link_map, lm_addr); @@ -79,7 +80,21 @@ legacy_svr4_fetch_link_map_offsets (void) lmo.l_name_offset = offsetof (struct link_map, lm_name); lmo.l_name_size = fieldsize (struct link_map, lm_name); -#endif /* SVR4_SHARED_LIBS */ +#else /* !defined(HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS) */ +#if HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS + lmo.link_map_size = sizeof (struct so_map); + + lmo.l_addr_offset = offsetof (struct so_map, som_addr); + lmo.l_addr_size = fieldsize (struct so_map, som_addr); + + lmo.l_next_offset = offsetof (struct so_map, som_next); + lmo.l_next_size = fieldsize (struct so_map, som_next); + + lmo.l_name_offset = offsetof (struct so_map, som_path); + lmo.l_name_size = fieldsize (struct so_map, som_path); +#endif /* HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */ +#endif /* HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */ +#endif /* HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS */ } #if defined (HAVE_STRUCT_LINK_MAP32) -- 2.34.1