I have a very old project in maintenance mode, based on the IceCube board
built upon ELDK 3.1.1.  I am trying to move the development environment to a
new PC running SUSE Linux 3.11.6.  I installed the ELDK using the same ISO
image and instructions that I had used many years ago.  My application
compiled fine, but wouldn't link due to undefined references.  I found that
even a simple empty main() program would produce these errors:

 

ppc_82xx-gcc  main.c

/opt/eldk/usr/bin/../lib/gcc-lib/ppc-linux/3.3.3/../../../../ppc-linux/bin/l
d: warning: ld.so.1, needed by /opt/eldk/usr/../ppc_82xx/lib/libc.so.6, not
found (try using -rpath or -rpath-link)

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_lookup_versioned_symbol_skip@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_rtld_global@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_lookup_versioned_symbol@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_start_profile@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_check_map_versions@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_mcount@GLIBC_2.1'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`__libc_enable_secure@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_get_origin@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_dst_substitute@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_debug_state@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_init@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`__libc_stack_end@GLIBC_2.1'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_dst_count@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_out_of_memory@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_signal_error@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_debug_printf@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_r_debug@GLIBC_2.0'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_map_object_deps@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_unload_cache@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_relocate_object@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_argv@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_catch_error@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_lookup_symbol_skip@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_lookup_symbol@GLIBC_PRIVATE'

/opt/eldk/usr/../ppc_82xx/lib/libc.so.6: undefined reference to
`_dl_map_object@GLIBC_PRIVATE'

collect2: ld returned 1 exit status

 

The libc.so.6 file is in the same folder as ld.so.1.

 

Ran "ppc_82xx-ldd   /opt/eldk/ppc_82xx/lib/libc.so.6" and it reported:

        ld.so.1 => /opt/eldk/ppc_82xx/lib/ld.so.1

 

Ran "ppc_82xx-ldd   /opt/eldk/ppc_82xx/lib/ld.so.1" and it reported no
dependencies.

 

After reading about similar problems, I tried compiling with "-shared", and
it fixed it.  Compiling my original application with "-shared" grows the
binary (stripped of debug symbols) from 7 MB to 11 MB. 

 

Is there another linker fix that wouldn't grow the application size?

 

Ed J

 

_______________________________________________
eldk mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/eldk

Reply via email to